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

instrument: fix duplicated instrumentation statements on already instrumented frameworks #42

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

darccio
Copy link
Member

@darccio darccio commented Sep 8, 2023

What does this PR do?

Instrumentation for frameworks using middlewares (as in mux.Use(instrumentation.Middleware)) were causing duplicated instrumentation statements when Orchestrion was run multiple times.

The root cause was that this kind of instrumentation requires a different set of labels (dd:instrumented, dd:startinstrument, dd:endinstrument) other than dd:startwrap and dd:endwrap.

Also some light refactor for framework tests.

Reviewer's Checklist

  • Changed code has unit tests for its functionality.

internal/instrument/chiv5_test.go Outdated Show resolved Hide resolved
@darccio darccio merged commit c29f503 into main Sep 12, 2023
2 checks passed
@darccio darccio deleted the dario.castane/AIT-8314/instrument-frameworks branch September 12, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants