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

feat: Add datadog tracing to http middleware #530

Merged
merged 12 commits into from
Mar 28, 2022
Merged

feat: Add datadog tracing to http middleware #530

merged 12 commits into from
Mar 28, 2022

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Mar 22, 2022

No description provided.

@f0ssel f0ssel requested a review from kylecarbs March 22, 2022 21:16
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #530 (8e2f954) into main (9485fd6) will increase coverage by 0.30%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
+ Coverage   63.56%   63.86%   +0.30%     
==========================================
  Files         197      114      -83     
  Lines       11524    10654     -870     
  Branches       85        0      -85     
==========================================
- Hits         7325     6804     -521     
+ Misses       3419     3091     -328     
+ Partials      780      759      -21     
Flag Coverage Δ
unittest-go- 63.06% <100.00%> (+0.45%) ⬆️
unittest-go-macos-latest 58.78% <100.00%> (+0.32%) ⬆️
unittest-go-ubuntu-latest 61.36% <100.00%> (-0.07%) ⬇️
unittest-go-windows-2022 57.76% <100.00%> (+0.01%) ⬆️
unittest-js ?
Impacted Files Coverage Δ
cli/start.go 66.15% <100.00%> (+2.35%) ⬆️
coderd/coderd.go 96.47% <100.00%> (+0.02%) ⬆️
peerbroker/dial.go 75.43% <0.00%> (-7.02%) ⬇️
provisionersdk/transport.go 74.46% <0.00%> (-6.39%) ⬇️
peer/conn.go 77.15% <0.00%> (-3.30%) ⬇️
provisioner/terraform/provision.go 72.29% <0.00%> (-1.37%) ⬇️
provisioner/terraform/serve.go 50.00% <0.00%> (ø)
site/src/components/SignIn/Welcome.tsx
site/src/components/Workspace/Workspace.tsx
site/src/components/Form/FormSection.tsx
... and 87 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9485fd6...8e2f954. Read the comment docs.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

Two minor things, but LGTM!

go.mod Show resolved Hide resolved
cli/start.go Outdated Show resolved Hide resolved
@kylecarbs
Copy link
Member

The failing check on here will be fixed if you merge in main!

@f0ssel f0ssel force-pushed the f0ssel/datadog2 branch 2 times, most recently from 1083544 to a16dc3e Compare March 25, 2022 15:33
@f0ssel
Copy link
Contributor Author

f0ssel commented Mar 25, 2022

Moved the ddtracer into a thin wrapper package tracer in 9ce5328. I wanted a place to write comments, have the code be more clearly self documenting, and give us a seam to use if we add more tracing things in the future.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

Let's add a thin-test to call start and stop with goleak. Then we can ensure no goroutines are leaked!

Apart from my one structural comment, this is awesome! Thoughts on adding a CLI flag to enable/disable tracing with the DATADOG_TOKEN? I'd rather this not be implicit, just in case customers want to disable it.

We can add that to coder.env too. That's used by our systems service in our dogfood deployment! Tracing in dogfood😎

tracer/tracer.go Outdated Show resolved Hide resolved
cli/start_test.go Outdated Show resolved Hide resolved
cli/start.go Outdated Show resolved Hide resolved
@kylecarbs
Copy link
Member

@f0ssel it appears the tunnel default to true broke from the flag PR. Since this is about to merge, could you investigate that? (assuming it's a simple fix)

@f0ssel f0ssel requested a review from kylecarbs March 28, 2022 21:49
@f0ssel
Copy link
Contributor Author

f0ssel commented Mar 28, 2022

@f0ssel it appears the tunnel default to true broke from the flag PR. Since this is about to merge, could you investigate that? (assuming it's a simple fix)

I'll do this in a separate PR to keep things clean

@f0ssel f0ssel enabled auto-merge (squash) March 28, 2022 22:06
@f0ssel f0ssel merged commit bd20d9e into main Mar 28, 2022
@f0ssel f0ssel deleted the f0ssel/datadog2 branch March 28, 2022 22:11
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
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.

None yet

4 participants