Skip to main content

TraceAI Fireworks AI Instrumentation

OpenTelemetry instrumentation for Fireworks AI, enabling comprehensive observability for LLM API calls.

Installation

pip install traceai-fireworks

Quick Start

from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType
from traceai_fireworks import FireworksInstrumentor

# Setup TraceAI
trace_provider = register(
    project_type=ProjectType.OBSERVE,
    project_name="my-fireworks-app",
)

# Instrument Fireworks
FireworksInstrumentor().instrument(tracer_provider=trace_provider)

# Now use OpenAI client with Fireworks
from openai import OpenAI

client = OpenAI(
    api_key="your-fireworks-api-key",
    base_url="https://api.fireworks.ai/inference/v1",
)

response = client.chat.completions.create(
    model="accounts/fireworks/models/llama-v3p1-8b-instruct",
    messages=[{"role": "user", "content": "Hello!"}]
)

Features

  • Automatic tracing of Fireworks AI API calls
  • Support for both synchronous and asynchronous operations
  • Streaming response support
  • Token usage tracking
  • Request/response attribute capture
  • OpenTelemetry semantic conventions for GenAI

Captured Attributes

  • gen_ai.request.model - Model name
  • gen_ai.request.max_tokens - Maximum tokens
  • gen_ai.request.temperature - Temperature setting
  • gen_ai.usage.input_tokens - Input token count
  • gen_ai.usage.output_tokens - Output token count
  • gen_ai.prompt.{n}.role - Message roles
  • gen_ai.prompt.{n}.content - Message contents
  • gen_ai.completion.{n}.content - Response content

Requirements

  • Python >= 3.9
  • openai >= 1.0.0
  • fi-instrumentation >= 0.1.0
  • opentelemetry-api >= 1.0.0
  • opentelemetry-sdk >= 1.0.0

License

Apache-2.0

Metadata

Release files for traceAI-fireworks 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceAI-fireworks 0.1.0
File Size Uploaded Provenance Actions
traceai_fireworks-0.1.0.tar.gz 4.7 kB Without provenance Details for traceai_fireworks-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceAI-fireworks 0.1.0
File Interpreter ABI Platform Actions
traceai_fireworks-0.1.0-py3-none-any.whl Python 3 none any Details for traceai_fireworks-0.1.0-py3-none-any.whl

Total release size: 10.7 kB

Release files / traceai_fireworks-0.1.0.tar.gz

Download URL traceai_fireworks-0.1.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
eca92117daf4c69f7a2f6f6b1081ea4b8674dd304ba9a6c419ca468e304c7ac5
BLAKE2b-256 checksum
How to use checksums
16041671f5ccf08d5b7792ba6846b559754c5552939760b4ba3d62123c8bfe4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / traceai_fireworks-0.1.0-py3-none-any.whl

Download URL traceai_fireworks-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bc7b9d263e9b8857d6eb30b89bfb74981a7511c0230a1c245963d0999502c84
BLAKE2b-256 checksum
How to use checksums
4a43986c8e2e3f710cda9b4b51b11d0b0c909ccd6933ff5ba2f8905acd2752f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for traceAI-fireworks 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page