OpenAI

  • Concept
  • 1-min read

Monitoring your OpenAI requests via Dynatrace, you can get cost analysis and forecast estimation via Davis AI, prompt and completion recording, error tracking, performance metrics of your AI services, and more.

OpenAI Observability

Explore the sample dashboard on the Dynatrace Playground.

Spans

The following attributes are available for GenAI Spans.

AttributeTypeDescription
gen_ai.completion.0.contentstringThe full response received from the GenAI model.
gen_ai.completion.0.content_filter_resultsstringThe filter results of the response received from the GenAI model.
gen_ai.completion.0.finish_reasonstringThe reason the GenAI model stopped producing tokens.
gen_ai.completion.0.rolestringThe role used by the GenAI model.
gen_ai.openai.api_basestringGenAI server address.
gen_ai.openai.api_versionstringGenAI API version.
gen_ai.openai.system_fingerprintstringThe fingerprint of the response generated by the GenAI model.
gen_ai.prompt.0.contentstringThe full prompt sent to the GenAI model.
gen_ai.prompt.0.rolestringThe role setting for the GenAI request.
gen_ai.prompt.prompt_filter_resultsstringThe filter results of the prompt sent to the GenAI model.
gen_ai.request.max_tokensintegerThe maximum number of tokens the model generates for a request.
gen_ai.request.modelstringThe name of the GenAI model a request is being made to.
gen_ai.request.temperaturedoubleThe temperature setting for the GenAI request.
gen_ai.request.top_pdoubleThe top_p sampling setting for the GenAI request.
gen_ai.response.modelstringThe name of the model that generated the response.
gen_ai.systemstringThe GenAI product as identified by the client or server instrumentation.
gen_ai.usage.completion_tokensintegerThe number of tokens used in the GenAI response (completion).
gen_ai.usage.prompt_tokensintegerThe number of tokens used in the GenAI input (prompt).
llm.request.typestringThe type of the operation being performed.

Metrics

MetricTypeUnitDescription
gen_ai.client.generation.choicescounternoneThe number of choices returned by chat completions call.
gen_ai.client.operation.durationhistogramsThe GenAI operation duration.
gen_ai.client.token.usagehistogramnoneThe number of input and output tokens used.
llm.openai.embeddings.vector_sizecounternoneThe size of returned vector.