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

[exporter/datadog] Update span_name_remappings examples #31483

Open
hanikesn opened this issue Feb 28, 2024 · 6 comments
Open

[exporter/datadog] Update span_name_remappings examples #31483

hanikesn opened this issue Feb 28, 2024 · 6 comments
Labels
documentation Improvements or additions to documentation exporter/datadog Datadog components priority:p2 Medium

Comments

@hanikesn
Copy link

hanikesn commented Feb 28, 2024

Component(s)

exporter/datadog

What happened?

Description

The examples use outdated behavior and do not give expected results. The expected format is # "otel.library.name/ScopeName"."span.kind" See:

# span_name_remappings:
# io.opentelemetry.javaagent.spring.client: spring.client
# instrumentation:express.server: express
# go.opentelemetry.io_contrib_instrumentation_net_http_otelhttp.client: http.client

Collector version

0.95

Environment information

No response

OpenTelemetry Collector configuration

exporters:
  datadog:
    traces:
      span_name_remappings:
        # "otel.library.name"."span.kind"
        "go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho.server": echo.server
        "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.client": http.client
        "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.client": grpc.client
        "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.server": grpc.server

Log output

No response

Additional context

No response

@hanikesn hanikesn added bug Something isn't working needs triage New item requiring triage labels Feb 28, 2024
@github-actions github-actions bot added the exporter/datadog Datadog components label Feb 28, 2024
Copy link
Contributor

Pinging code owners:

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

@crobert-1
Copy link
Member

@hanikesn Can you share where you're getting the expected format from?

I looked into it a bit and the span_name_remappings configuration option is being mapped to the Datadog agent's configuration option of the same name. The comment there is that the variable is used to map from the Datadog span name to the preferred name. The examples you've referenced also currently match what is given in the config file.

I think the existing example may be correct based on this information, but the code owners would have a definitive answer here.

@hanikesn
Copy link
Author

@hanikesn Can you share where you're getting the expected format from?

That was mostly by trial and error until I got the expected result in the Datadog UI.

I think the existing example may be correct based on this information

Unfortunately those didn't work and I spent quite some time figuring our the correct format. Others share the same confusion:
#1909 (comment)
And see this comment suggesting to update the examples as well:
DataDog/datadog-agent#12176 (comment)

@mx-psi mx-psi added documentation Improvements or additions to documentation and removed waiting for author bug Something isn't working labels Mar 13, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label May 13, 2024
@hanikesn
Copy link
Author

I can confirm that even with the latest datadog agent (7.54) and using DD_OTLP_CONFIG_TRACES_SPAN_NAME_REMAPPINGS:
You have to use:

"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc.server": "grpc.server"

instead of:

"go.opentelemetry.io_contrib_instrumentation_google.golang.org_grpc_otelgrpc.server": "grpc.server",

@github-actions github-actions bot removed the Stale label Jun 11, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Aug 12, 2024
@mx-psi mx-psi removed the Stale label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation exporter/datadog Datadog components priority:p2 Medium
Projects
None yet
Development

No branches or pull requests

3 participants