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

Missing url from X-Ray segment #35375

Closed
bjrara opened this issue Sep 23, 2024 · 4 comments · Fixed by #36530
Closed

Missing url from X-Ray segment #35375

bjrara opened this issue Sep 23, 2024 · 4 comments · Fixed by #36530
Labels
bug Something isn't working exporter/awsxray needs triage New item requiring triage

Comments

@bjrara
Copy link
Contributor

bjrara commented Sep 23, 2024

Component(s)

exporter/awsxray

What happened?

Description

URL is missing from X-Ray client segment.

A trace span is generated with the following attributes, but after converting to X-Ray segment, the url is not shown properly in the trace.

Input

otel-collector  | Span #5
otel-collector  |     Trace ID       : 66eb757066b5d7c915edd0c70e66a400
otel-collector  |     Parent ID      : 7781c24cc117e0f7
otel-collector  |     ID             : 17b1db5775e39506
otel-collector  |     Name           : HTTP POST
otel-collector  |     Kind           : Client
otel-collector  |     Start time     : 2024-09-19 00:50:56.546713821 +0000 UTC
otel-collector  |     End time       : 2024-09-19 00:50:57.290126759 +0000 UTC
otel-collector  |     Status code    : Unset
otel-collector  |     Status message :
otel-collector  | Attributes:
otel-collector  |      -> http.method: Str(POST)
otel-collector  |      -> http.scheme: Str(https)
otel-collector  |      -> http.target: Str(/api/v1/%hidden_info%)
otel-collector  |      -> net.peer.name: Str(%hidden_info%)
otel-collector  |      -> net.peer.port: Int(443)
otel-collector  |      -> http.status_code: Int(200)

Output

{
  "id": "17b1db5775e39506",
  "name": "%hidden_info%",
  "start_time": 1726707056.5467138,
  "end_time": 1726707057.2901268,
  "fault": false,
  "error": false,
  "throttle": false,
  "http": {
    "request": {
      "method": "POST"
    },
    "response": {
      "status": 200,
      "content_length": 0
    }
  },
  "aws": {
    "xray": {
      "auto_instrumentation": false,
      "sdk_version": "1.2.1",
      "sdk": "opentelemetry for ruby"
    }
  },
  "namespace": "remote"
}

Steps to Reproduce

Expected Result

Segment contains http url.

Actual Result

Segment doesn't contain http url.

Collector version

Latest

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@bjrara bjrara added bug Something isn't working needs triage New item requiring triage labels Sep 23, 2024
Copy link
Contributor

Pinging code owners:

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

@bjrara
Copy link
Contributor Author

bjrara commented Sep 23, 2024

Currently, it only generates http url section when the following attributes are found [source]:

  1. http.url
  2. url.full
  3. http.host
  4. http.server_name
  5. host.name
  6. net.host.name
  7. net.peer.ip
  8. network.peer.address
  9. server.address

It's unclear why net.peer.name was not respected when deciding the url generation.

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 Nov 25, 2024
@bjrara
Copy link
Contributor Author

bjrara commented Nov 25, 2024

I will help address it.

@github-actions github-actions bot removed the Stale label Nov 26, 2024
ZenoCC-Peng pushed a commit to ZenoCC-Peng/opentelemetry-collector-contrib that referenced this issue Dec 6, 2024
…name is available (open-telemetry#36530)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Generate url section in X-Ray segment when net.peer.name is available

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
open-telemetry#35375.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Unit test
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this issue Dec 17, 2024
…name is available (open-telemetry#36530)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Generate url section in X-Ray segment when net.peer.name is available

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes
open-telemetry#35375.

<!--Describe what testing was performed and which tests were added.-->
#### Testing
Unit test
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/awsxray needs triage New item requiring triage
Projects
None yet
1 participant