Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Data Explorer Exporter - TraceId and SpanId property names have wrong mappings #26303

Closed
akakarikos opened this issue Aug 30, 2023 · 4 comments
Labels
bug Something isn't working exporter/azuredataexplorer needs triage New item requiring triage

Comments

@akakarikos
Copy link

akakarikos commented Aug 30, 2023

Component(s)

exporter/azuredataexplorer

What happened?

Description

The properties TraceId, SpanId, and ParentId for the ADX Logs and Traces tables, do not map to the properties emitted by the OTel collector for this exporter.

Steps to Reproduce

Configure the OTel collector to export to ADX using the table schemas provided by the documentation.

Expected Result

The TraceId, SpanId, and ParentId column names in the ADX Logs and Traces tables are populated with the correct values.

Actual Result

The TraceId, SpanId, and ParentId column names in the ADX Logs and Traces tables are empty.

Collector version

0.83.0

Environment information

Environment

Docker image deployed in AKS.
OS: linux amd64

OpenTelemetry Collector configuration

apiVersion: v1
kind: ConfigMap
metadata:
  name: otel-collector-config
data:
  config.yaml: |-
    receivers:
      zipkin:
        endpoint: localhost:9411
      otlp:
        protocols:
          grpc:
            endpoint: localhost:4317
          http:
            endpoint: localhost:4318
            
    processors:
      memory_limiter:
        check_interval: 1s
        limit_percentage: 80
        spike_limit_percentage: 30

      batch:
        send_batch_size: 50
    
    exporters:
      logging:
        verbosity: detailed
    
      azuremonitor:
        instrumentation_key: 
        spaneventsenabled: true

      azuredataexplorer:
        cluster_uri: 
        application_id: 
        application_key: 
        tenant_id:
        db_name: 
        metrics_table_name: 
        logs_table_name: 
        traces_table_name: 
        ingestion_type : 'managed'
    
    service:
      pipelines:
        traces:
          receivers: [zipkin,otlp]
          processors: [memory_limiter,batch]
          exporters: [azuredataexplorer,azuremonitor,logging]
        logs:
          receivers: [otlp]
          processors: [memory_limiter,batch]
          exporters: [azuredataexplorer,azuremonitor,logging]

Log output

No response

Additional context

The workaround in order to fix this, is to use custom ingestion mappings that will map the TraceID to TraceId, SpanID to SpanId, and ParentID to ParentId.

@akakarikos akakarikos added bug Something isn't working needs triage New item requiring triage labels Aug 30, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@ag-ramachandran
Copy link
Contributor

Hello @akakarikos ,

The README and table creation was amended in the README opentelemetry-collector-contrib/README.md at main · open-telemetry/opentelemetry-collector-contrib · GitHub

Note the case of ID in the table.

.create-merge table <Traces-Table-Name> (TraceID:string, SpanID:string, ParentID:string, SpanName:string, SpanStatus:string, SpanKind:string, StartTime:datetime, EndTime:datetime, ResourceAttributes:dynamic, TraceAttributes:dynamic, Events:dynamic, Links:dynamic)

@akakarikos
Copy link
Author

Thanks @ag-ramachandran. Can you also update the section where the ADX columns are defined as well [here] (https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/azuredataexplorerexporter/README.md#traces) please (the tables that list the columns one by one)?

@ag-ramachandran
Copy link
Contributor

Sure @akakarikos, will do that. If the technical issue is solved, do close the ticket. Will update the documentation seperately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/azuredataexplorer needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

2 participants