Skip to content

Conversation

@cbandy
Copy link
Member

@cbandy cbandy commented Dec 2, 2024

This updates OpenTelemetry modules and imports them into an internal/tracing package.

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • Other

Other Information:

Issue: PGO-1954

Copy link
Contributor

@tjmoore4 tjmoore4 left a comment

Choose a reason for hiding this comment

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

Looks good to me, a couple of comments but no blockers.

ctx, span := tracing.Start(ctx, "reconcile-pgupgrade")
log := logging.FromContext(ctx)
defer span.End()
defer func(s tracing.Span) { _ = tracing.Escape(s, err) }(span)
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 This is another place where I am unsure why we're using Escape instead of Check (there are others, but I think it's generally the same question, so I won't mention any more).

The "autoexport" and "autoprop" packages import and configure standard
exporters according to the current Specification, 1.39.0. The correct
correlation of logs to trace context uses underscores now.

The "google.golang.org/grpc" module raised its required Go version to
1.22.7 this release but has since reverted that change.

The "spancheck" linter reminds us to call "Span.End" after calling "tracing.Start".

Issue: PGO-1954
See: https://opentelemetry.io/docs/specs/otel
See: https://opentelemetry.io/docs/specs/otel/compatibility/logging_trace_context
See: https://www.github.com/open-telemetry/opentelemetry-go/issues/5969
The "spancheck" linter reminds us to call "Span.RecordError" when
returning an error. Two functions help with that: "tracing.Check" and
"tracing.Escape".
@cbandy cbandy merged commit fde2ec3 into CrunchyData:main Dec 10, 2024
16 of 17 checks passed
@cbandy cbandy deleted the tracing branch December 10, 2024 22:00
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