otel-genai vs openinference instrumentation result

Creado El diff nunca expira
63 eliminaciones
147 líneas
74 adiciones
162 líneas
resource_spans {
resource_spans {
resource {
resource {
attributes {
attributes {
key: "telemetry.sdk.language"
key: "telemetry.sdk.language"
value {
value {
string_value: "python"
string_value: "python"
}
}
}
}
attributes {
attributes {
key: "telemetry.sdk.name"
key: "telemetry.sdk.name"
value {
value {
string_value: "opentelemetry"
string_value: "opentelemetry"
}
}
}
}
attributes {
attributes {
key: "telemetry.sdk.version"
key: "telemetry.sdk.version"
value {
value {
string_value: "1.43.0.dev"
string_value: "1.43.0.dev"
}
}
}
}
attributes {
attributes {
key: "service.instance.id"
key: "service.instance.id"
value {
value {
string_value: "fae60423-bbaa-4665-aa07-d3cbd6a0de01"
string_value: "ac240951-3efa-4eed-b24b-529d91dfa958"
}
}
}
}
attributes {
attributes {
key: "service.name"
key: "service.name"
value {
value {
string_value: "write-to-file-example"
string_value: "write-to-file-example"
}
}
}
}
}
}
scope_spans {
scope_spans {
scope {
scope {
name: "opentelemetry.util.genai.handler"
name: "openinference.instrumentation.google_genai"
version: "1.0b0.dev"
version: "1.1.0"
}
}
spans {
spans {
trace_id: "\231\254\003\304Q\210\336\216\2620\351V)\266[\241"
trace_id: "\215\315\351\262\265{\227\360KI\316\023\223sK\017"
span_id: "\306\027\345)\314\364\365\302"
span_id: "\216oaT\3346\223\331"
parent_span_id: "I_\341\310N}\201B"
name: "GenerateContent"
name: "execute_tool add"
kind: SPAN_KIND_INTERNAL
kind: SPAN_KIND_CLIENT
start_time_unix_nano: 1781638259223235385
start_time_unix_nano: 1781708521782630572
end_time_unix_nano: 1781638269996184096
end_time_unix_nano: 1781708521782779222
attributes {
attributes {
key: "gen_ai.operation.name"
key: "llm.provider"
value {
value {
string_value: "execute_tool"
string_value: "google"
}
}
}
}
attributes {
attributes {
key: "gen_ai.tool.name"
key: "llm.input_messages.0.message.role"
value {
value {
string_value: "add"
string_value: "user"
}
}
}
}
attributes {
attributes {
key: "gen_ai.tool.call.arguments"
key: "llm.input_messages.0.message.content"
value {
value {
string_value: "{\"code.function.parameters.a.type\": \"int\", \"code.function.parameters.a.value\": 2, \"code.function.parameters.b.type\": \"int\", \"code.function.parameters.b.value\": 8}"
string_value: "Can you add 2 and 8"
}
}
}
}
attributes {
attributes {
key: "gen_ai.tool.call.result"
key: "input.value"
value {
value {
string_value: "10"
string_value: "{\"contents\": [{\"parts\": [{\"text\": \"Can you add 2 and 8\"}], \"role\": \"user\"}], \"tools\": [{\"function_declarations\": [{\"name\": \"add\", \"parameters\": {\"properties\": {\"a\": {\"type\": \"INTEGER\"}, \"b\": {\"type\": \"INTEGER\"}}, \"required\": [\"a\", \"b\"], \"type\": \"OBJECT\"}, \"response\": {\"type\": \"INTEGER\"}}]}], \"generation_config\": {}}"
}
}
}
}
status {
attributes {
key: "input.mime_type"
value {
string_value: "application/json"
}
}
}
flags: 256
attributes {
key: "llm.tools.0.tool.json_schema"
value {
string_value: "{\"name\": \"add\", \"parameters\": {\"properties\": {\"a\": {\"type\": \"INTEGER\"}, \"b\": {\"type\": \"INTEGER\"}}, \"required\": [\"a\", \"b\"], \"type\": \"OBJECT\"}}"
}
}
spans {
}
trace_id: "\231\254\003\304Q\210\336\216\2620\351V)\266[\241"
span_id: "I_\341\310N}\201B"
name: "generate_content gemini-2.5-flash"
kind: SPAN_KIND_CLIENT
start_time_unix_nano: 1781708519617499096
end_time_unix_nano: 1781708522341886006
attributes {
attributes {
key: "gen_ai.operation.name"
key: "output.value"
value {
value {
string_value: "generate_content"
string_value: "{\"sdk_http_response\":{\"headers\":{\"Content-Type\":\"application/json; charset=UTF-8\",\"Vary\":\"Origin, X-Origin, Referer\",\"Content-Encoding\":\"gzip\",\"Date\":\"Tue, 16 Jun 2026 19:31:09 GMT\",\"Server\":\"scaffolding on HTTPServer2\",\"X-XSS-Protection\":\"0\",\"X-Frame-Options\":\"SAMEORIGIN\",\"X-Content-Type-Options\":\"nosniff\",\"Transfer-Encoding\":\"chunked\"}},\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"The sum of 2 and 8 is 10.\"}],\"role\":\"model\"},\"finish_reason\":\"STOP\",\"avg_logprobs\":-0.007154934108257294}],\"create_time\":\"2026-06-16T19:31:01.961885Z\",\"model_version\":\"gemini-2.5-flash\",\"response_id\":\"daQxat3aOvGX2PgP5emhgAw\",\"usage_metadata\":{\"candidates_token_count\":13,\"candidates_tokens_details\":[{\"modality\":\"TEXT\",\"token_count\":13}],\"prompt_token_count\":87,\"prompt_tokens_details\":[{\"modality\":\"TEXT\",\"token_count\":87}],\"total_token_count\":100,\"traffic_type\":\"ON_DEMAND\"},\"automatic_function_calling_history\":[{\"parts\":[{\"text\":\"Can you add 2 and 8\"}]},{\"parts\":[{\"function_call\":{\"args\":{\"a\":2,\"b\":8},\"name\":\"add\"},\"thought_signature\":\"CvYBAY89a1-6bioevGFexI0qirCQZV9CU5oDlusZ1O309ukT9szl68aJLG-kVVwAzcM7PKfA6oMgwg5CqX9zeAFNZDJaCtnaJP3bC3UeaVPh0zPqi2jK1IWOCbui3TrDGqKrbuXOnTpj7R5hFpgHbi8ltPlzpCNoxWy3fIXoHIViAtMZdiTC4ZqZbXTVPzX2dQEKh0nlfxg_IlliCWscujSbW9jPtJ7c5sAJvcuPjqyfsFoqTFcROnRzsmdioo-5T9-sP9RdW3_xipjpix7LSLGXA2xd4T9Yoz74Gbs2kIrUhi2BF4DUPL_MFQgalnSmZ-IIu_38CKO0\"}],\"role\":\"model\"},{\"parts\":[{\"function_response\":{\"parts\":null,\"name\":\"add\",\"response\":{\"result\":10}}}],\"role\":\"user\"}]}"
}
}
}
}
attributes {
attributes {
key: "gen_ai.request.model"
key: "output.mime_type"
value {
string_value: "application/json"
}
}
attributes {
key: "llm.model_name"
value {
value {
string_value: "gemini-2.5-flash"
string_value: "gemini-2.5-flash"
}
}
}
}
attributes {
attributes {
key: "gen_ai.provider.name"
key: "llm.token_count.prompt"
value {
value {
string_value: "vertex_ai"
int_value: 87
}
}
}
}
attributes {
attributes {
key: "gen_ai.response.finish_reasons"
key: "llm.token_count.completion"
value {
value {
array_value {
int_value: 13
values {
string_value: "stop"
}
}
}
}
attributes {
key: "llm.token_count.total"
value {
int_value: 100
}
}
}
}
attributes {
attributes {
key: "gen_ai.usage.input_tokens"
key: "llm.output_messages.0.message.content"
value {
value {
int_value: 72
string_value: "The sum of 2 and 8 is 10."
}
}
}
}
attributes {
attributes {
key: "gen_ai.usage.output_tokens"
key: "llm.output_messages.0.message.role"
value {
value {
int_value: 13
string_value: "model"
}
}
}
}
attributes {
attributes {
key: "gen_ai.input.messages"
key: "message.tool_calls.0.tool_call.function.name"
value {
value {
string_value: "[{\"role\":\"user\",\"parts\":[{\"content\":\"Can you add 2 and 8\",\"type\":\"text\"}]}]"
string_value: "add"
}
}
}
}
attributes {
attributes {
key: "gen_ai.output.messages"
key: "message.tool_calls.0.tool_call.function.arguments"
value {
value {
string_value: "[{\"role\":\"assistant\",\"parts\":[{\"content\":\"The sum of 2 and 8 is 10.\",\"type\":\"text\"}],\"finish_reason\":\"stop\"}]"
string_value: "{\"a\": 2, \"b\": 8}"
}
}
}
}
attributes {
attributes {
key: "gen_ai.tool.definitions"
key: "message.tool_calls.0.tool_call.reasoning_signature"
value {
value {
string_value: "[{\"name\":\"add\",\"description\":\"\",\"parameters\":null,\"type\":\"function\"}]"
string_value: "CvYBAY89a1+6bioevGFexI0qirCQZV9CU5oDlusZ1O309ukT9szl68aJLG+kVVwAzcM7PKfA6oMgwg5CqX9zeAFNZDJaCtnaJP3bC3UeaVPh0zPqi2jK1IWOCbui3TrDGqKrbuXOnTpj7R5hFpgHbi8ltPlzpCNoxWy3fIXoHIViAtMZdiTC4ZqZbXTVPzX2dQEKh0nlfxg/IlliCWscujSbW9jPtJ7c5sAJvcuPjqyfsFoqTFcROnRzsmdioo+5T9+sP9RdW3/xipjpix7LSLGXA2xd4T9Yoz74Gbs2kIrUhi2BF4DUPL/MFQgalnSmZ+IIu/38CKO0"
}
}
attributes {
key: "openinference.span.kind"
value {
string_value: "LLM"
}
}
}
}
status {
status {
code: STATUS_CODE_OK
}
}
flags: 256
flags: 256
}
}
schema_url: "https://opentelemetry.io/schemas/1.37.0"
}
}
}
}
)
}