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

Geneva Exporter is not exporting any tags added in Enrich method when it triggered for StopActivity Event #1399

Closed
vaibhavjainTM opened this issue Oct 13, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@vaibhavjainTM
Copy link

Bug Report

List of [all OpenTelemetry NuGet
"OpenTelemetry" version="1.5.1"
"OpenTelemetry.Api" version="1.5.1"
"OpenTelemetry.Api.ProviderBuilderExtensions" version="1.5.1"
"OpenTelemetry.Audit.Geneva" version="1.2.0"
"OpenTelemetry.Exporter.Geneva" version="1.5.1"
"OpenTelemetry.Instrumentation.AspNet" version="1.0.0-rc9.9"
"OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule" version="1.0.0-rc9.9"
"OpenTelemetry.Instrumentation.AspNetCore" version="1.5.1-beta.1"
"OpenTelemetry.Instrumentation.Http" version="1.5.0-beta.1"
"OpenTelemetry.Instrumentation.Process" version="1.0.0-alpha.6"
"OpenTelemetry.Instrumentation.SqlClient" version="1.5.1-beta.1"
"OpenTelemetry.PersistentStorage.Abstractions" version="1.0.0-beta.2"
"OpenTelemetry.PersistentStorage.FileSystem" version="1.0.0-beta.2"

  • TBD

net 472

  • TBD

Symptom

Instrumentation library - OpenTelemetry.Instrumentation.AspNet
Class - AspNetInstrumentationOptions
Method - Enrich

When Enrich method calls for StopActivity Event, any tags added in this method is not being exported (including http.statusCode tag which is auto collected by this instrumentation library).
`private void ConfigureAspNetInstrumentation(AspNetInstrumentationOptions aspNetInstrumentationOptions)
{
aspNetInstrumentationOptions.RecordException = true;

aspNetInstrumentationOptions.Enrich = (activity, eventName, obj) =>
{
	if (eventName.Equals("OnStopActivity"))
	{
		activity.SetTag("stopactivityeventtest", true);
	}
};

What is the expected behavior?
`private void ConfigureAspNetInstrumentation(AspNetInstrumentationOptions aspNetInstrumentationOptions)
{
aspNetInstrumentationOptions.RecordException = true;

aspNetInstrumentationOptions.Enrich = (activity, eventName, obj) =>
{
            if (eventName.Equals("OnStopActivity"))
	{
		activity.SetTag("stopactivityeventtest", true);
	}
};

stopactivityeventtest tag should be exported to geneva.
http.statusCode tag (which is auto collected by this instrumentation library before this methods calls) should be exported to geneva.

What is the actual behavior?

stopactivityeventtest tag is not exporting to geneva.
http.statusCode tag (which is auto collected by this instrumentation library before this methods calls) is not exporting to geneva.

@vaibhavjainTM vaibhavjainTM added the bug Something isn't working label Oct 13, 2023
@cijothomas cijothomas transferred this issue from open-telemetry/opentelemetry-dotnet Oct 13, 2023
@cijothomas
Copy link
Member

closing #1388

The title of the issue is misleading. This has nothing to do with any exporter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants