Maps ModelProvider enums to OpenTelemetry GenAI provider names.
// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.micrometer.metrics.conventions;
import dev.langchain4j.model.ModelProvider;
/**
* Maps {@link ModelProvider} values to OpenTelemetry Semantic Conventions (v1.39.0)
* well-known values for the {@code gen_ai.provider.name} attribute.
*
* @see <a href="https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-spans/">OTel GenAI Spans</a>
*/
public enum OTelGenAiProviderName {
ANTHROPIC(ModelProvider.ANTHROPIC, "anthropic"),
AMAZON_BEDROCK(ModelProvider.AMAZON_BEDROCK, "aws.bedrock"),
// Azure OpenAI is deprecated in favor of Microsoft Foundr
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key