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

Fix enabling telemetry #2061

Merged
merged 2 commits into from
May 6, 2022
Merged

Conversation

carolynvs
Copy link
Member

What does this change

  • The if statement was inverted so we weren't ever using the tracer.
  • I was accidentally closing the tracer instead of ending the span in one spot.

What issue does it fix

Fixing a regression caused by #2026 when I applied some review feedback and got the boolean logic flipflopped. I've added an integration test to verify that the tracer is a real one.

Notes for the reviewer

Put any questions or notes for the reviewer here.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

* The if statement was inverted so we weren't ever using the tracer.
* I was accidentally closing the tracer instead of ending the span in
  one spot.

Signed-off-by: Carolyn Van Slyck <[email protected]>
@carolynvs carolynvs requested a review from VinozzZ May 6, 2022 19:58
defer test.RunPorter("uninstall", "otel-jaeger", "--allow-docker-host-access")

// Wait until the collection should be up
time.Sleep(10 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a immediate solution in mind but this maybe flaky in some situations

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! I wanted to get something to test that it's working or not for now and if I come up with a better way I'll update the test.

I tried doing a net dial but that passes just fine and then later the trace setup fails because the otel service isn't 100% ready. I feel like the best fix would be to have the porter bundle that installs the otel collection have logic and wait until the collector is up.

@carolynvs carolynvs merged commit aa36a19 into getporter:release/v1 May 6, 2022
@carolynvs carolynvs deleted the fix-tracing branch May 6, 2022 21:26
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