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(logging): fix traces export through opentelemetry #1355

Merged
merged 2 commits into from
Jun 6, 2023

Conversation

ashokkjag
Copy link
Contributor

@ashokkjag ashokkjag commented Jun 6, 2023

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

opentelemetry sdk currently isn't exporting traces to otel collector. This now works after changing to batch exporter which is better for performance reasons. Pipeline is now changed to batch exporter with the timeout of 1 second.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

Traces are vital to debug failures and to diagnose latency issues. Traces aren't getting exported/reflecting in Grafana/Tempo. This change fixes the issue and traces are available in Grafana.

How did you test it?

  • set log.telemetry.traces_enabled = true in config/docker_compose.toml
  • start docker compose docker compose -f docker-compose.yml -p hyperswitch-tempo --profile monitoring up
  • after the hyperswitch server is up, hit the endpoints and verify the traces in Grafana/Tempo

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed submitted code
  • I added unit tests for my changes where possible
  • I added a CHANGELOG entry if applicable

opentelemetry sdk isn't exporting traces to otel collector. This
now works with batch exporter which is better for performance reasons.
Pipeline is now changed to batch exporter with the timeout of 1 second.
@ashokkjag ashokkjag added A-framework Area: Framework C-bug Category: Bug R-waiting-on-L1 Review: Waiting on L1 reviewer labels Jun 6, 2023
@ashokkjag ashokkjag self-assigned this Jun 6, 2023
@ashokkjag ashokkjag requested review from a team and jarnura as code owners June 6, 2023 10:23
Copy link
Member

@SanchithHegde SanchithHegde left a comment

Choose a reason for hiding this comment

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

Other than that, looks good to me!

crates/router_env/Cargo.toml Outdated Show resolved Hide resolved
lsampras
lsampras previously approved these changes Jun 6, 2023
docker-compose.yml Outdated Show resolved Hide resolved
@ashokkjag ashokkjag added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed and removed R-waiting-on-L1 Review: Waiting on L1 reviewer labels Jun 6, 2023
@jarnura jarnura added this pull request to the merge queue Jun 6, 2023
@jarnura jarnura removed the S-waiting-on-review Status: This PR has been implemented and needs to be reviewed label Jun 6, 2023
Merged via the queue into main with commit b2b9dc0 Jun 6, 2023
@SanchithHegde SanchithHegde deleted the fix_tracing_export branch June 6, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Area: Framework C-bug Category: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants