Fill gaps in otel exporter implementation - #532
Merged
Merged
Conversation
…tions to OTLP configuration Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
… conventions Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
… type Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…tion attribute to semantic conventions Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…utes with semantic conventions Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…odes with semantic conventions Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
… conventions Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…t tests Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…as missing Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
Replace hardcoded 'rpc.system.name' string with the RPC_SYSTEM_ATTR shim constant so tests pass on both old (rpc.system) and new (rpc.system.name) semconv gem versions. Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
The OTLP exporter had several gaps relative to the OpenTelemetry semantic conventions specification: attributes used string literals instead of semconv constants, some instrumentations were missing (Kafka, ActiveJob), database system names were not normalised, and error events incorrectly propagated the span name as the exception/error type. This PR fills those gaps to produce spec-compliant OTLP payloads.
What
lib/instana/config.rb): added three new OTLP config options —protocol(http/protobufdefault),semconv_stability(stabledefault), andinsecure(falsedefault) — read from env vars (OTEL_EXPORTER_OTLP_PROTOCOL,OTEL_SEMCONV_STABILITY_OPT_IN,OTEL_EXPORTER_OTLP_INSECURE), YAML, and agent discovery.host_agent_reporting_observer.rb): passssl_verify_mode: OpenSSL::SSL::VERIFY_NONEto the OTLP exporter wheninsecure: true.http_converter.rb): replaced string-literalnetwork.protocol.*attributes withOpenTelemetry::SemConv::NETWORKconstants.rpc_converter.rb): replacedrpc.systemwithrpc.system.name; mappedserver.portandnetwork.peer.{address,port}correctly; added a full gRPC status code mapping (0 = OK for success spans, named code otherwise, UNKNOWN as fallback).database_converter.rb): added adapter name normalisation (e.g.mysql2→mysql,sqlite3→sqlite); addeddb.collection.namefor ActiveRecord, Sequel, and MongoDB; replaceddb.redis.database_indexwithdb.namespace; replaceddb.memcached.namespacewithdb.namespace; addeddb.operation.namefor Redis.messaging_converter.rb): added Kafka support (messaging.system, destination name, operation); replacedmessaging.operationwithmessaging.operation.name; extractedserver.portfrom RabbitMQ address; addedmessaging.message.body.sizeandmessaging.operation.nameto RabbitMQ.background_job_converter.rb): added ActiveJob support; replaced deprecatedmessaging.operationwithmessaging.operation.name.aws_converter.rb): replaced proprietaryaws.service/aws.s3.operationwith RPC semconv (rpc.system.name,rpc.method); addedcloud.providerandcloud.region; replaced stringfaas.invoked_namewithOpenTelemetry::SemConv::Incubating::FAASconstant.base_converter.rb): stopped populating span name asexception.type/error.typein error events.config_test.rband all affected converter test files to cover new attributes and edge cases.