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

[pdatatest] Ignore trace ID #27687

Closed
atoulme opened this issue Oct 16, 2023 · 1 comment
Closed

[pdatatest] Ignore trace ID #27687

atoulme opened this issue Oct 16, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atoulme
Copy link
Contributor

atoulme commented Oct 16, 2023

Component(s)

pkg/pdatatest

Is your feature request related to a problem? Please describe.

ptracetest doesn't support ignoring trace IDs.

Describe the solution you'd like

Have a way to reset trace IDs to empty traces.

Describe alternatives you've considered

We use this code to reset trace IDs:

func ignoreTraceID(traces ptrace.Traces) {
	for i := 0; i < traces.ResourceSpans().Len(); i++ {
		rs := traces.ResourceSpans().At(i)
		for j := 0; j < rs.ScopeSpans().Len(); j++ {
			ss := rs.ScopeSpans().At(j)
			for k := 0; k < ss.Spans().Len(); k++ {
				span := ss.Spans().At(k)
				span.SetTraceID(pcommon.NewTraceIDEmpty())
			}
		}
	}
}

Additional context

No response

@atoulme atoulme added enhancement New feature or request needs triage New item requiring triage labels Oct 16, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@djaglowski djaglowski added help wanted Extra attention is needed good first issue Good for newcomers and removed needs triage New item requiring triage labels Oct 16, 2023
dmitryax pushed a commit that referenced this issue Oct 19, 2023
**Description:** 
Support ignore trace ID in span comparisons for ptracetest.

**Link to tracking Issue:**

#27687
martin-majlis-s1 pushed a commit to scalyr/opentelemetry-collector-contrib that referenced this issue Oct 20, 2023
**Description:** 
Support ignore trace ID in span comparisons for ptracetest.

**Link to tracking Issue:**

open-telemetry#27687
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this issue Oct 27, 2023
**Description:** 
Support ignore trace ID in span comparisons for ptracetest.

**Link to tracking Issue:**

open-telemetry#27687
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
**Description:** 
Support ignore trace ID in span comparisons for ptracetest.

**Link to tracking Issue:**

open-telemetry#27687
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants