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: Improve OpenTelemetry #60

Conversation

gfyrag
Copy link
Contributor

@gfyrag gfyrag commented Nov 23, 2022

Improve OpenTelemetry

Add instrumentation of mongodb library.
Add instrumentation of all http clients built by the connectors.
Also, add context on all functions using http clients, and use context provided by the framework.

On framework, add a trace initialization and forward context to connectors.

You can test locally, and see result on http://localhost:16686

@gfyrag gfyrag changed the base branch from main to feat/num-1050-payments-update-go-libs-to-last-version November 23, 2022 15:00
rootMux.Use(recoveryHandler(httpRecoveryFunc))
rootMux.Use(httpCorsHandler())
rootMux.Use(httpServeFunc)

// Deprecated
rootMux.Path("/_health").Handler(healthHandler(client))
Copy link
Contributor Author

@gfyrag gfyrag Nov 23, 2022

Choose a reason for hiding this comment

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

We defined than health check must be /_healthcheck.
Keep for backward compatibility.

@codecov
Copy link

codecov bot commented Nov 23, 2022

Codecov Report

Merging #60 (c554519) into feat/num-1050-payments-update-go-libs-to-last-version (a7d0c9b) will decrease coverage by 0.02%.
The diff coverage is 10.71%.

@@                                    Coverage Diff                                    @@
##           feat/num-1050-payments-update-go-libs-to-last-version      #60      +/-   ##
=========================================================================================
- Coverage                                                  24.39%   24.37%   -0.03%     
=========================================================================================
  Files                                                         87       87              
  Lines                                                       4119     4147      +28     
=========================================================================================
+ Hits                                                        1005     1011       +6     
- Misses                                                      3019     3041      +22     
  Partials                                                      95       95              
Impacted Files Coverage Δ
internal/app/database/module.go 0.00% <0.00%> (ø)
internal/pkg/connectors/bankingcircle/client.go 0.00% <0.00%> (ø)
...kg/connectors/bankingcircle/task_fetch_payments.go 0.00% <0.00%> (ø)
...rnal/pkg/connectors/currencycloud/client/client.go 0.00% <0.00%> (ø)
internal/pkg/connectors/modulr/client/client.go 0.00% <0.00%> (ø)
internal/pkg/connectors/stripe/client.go 9.41% <0.00%> (-0.23%) ⬇️
...al/pkg/connectors/stripe/task_connected_account.go 0.00% <ø> (ø)
internal/pkg/connectors/stripe/task_main.go 0.00% <ø> (ø)
internal/pkg/connectors/wise/client.go 0.00% <0.00%> (ø)
...ternal/pkg/connectors/wise/task_fetch_transfers.go 0.00% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gfyrag gfyrag marked this pull request as ready for review November 23, 2022 15:03
@gfyrag gfyrag force-pushed the feat/num-1040-payments-opentelemetry branch from 4fa9c54 to 9ed3b28 Compare November 23, 2022 15:10
@gfyrag gfyrag force-pushed the feat/num-1050-payments-update-go-libs-to-last-version branch from 8447e4c to a7d0c9b Compare November 24, 2022 08:10
@gfyrag gfyrag force-pushed the feat/num-1040-payments-opentelemetry branch from 9ed3b28 to c554519 Compare November 24, 2022 08:11
@flemzord flemzord merged commit c8d90b3 into feat/num-1050-payments-update-go-libs-to-last-version Nov 25, 2022
@flemzord flemzord deleted the feat/num-1040-payments-opentelemetry branch November 25, 2022 14:59
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.

3 participants