Skip to content

Add metrics + tracing for Postgres with otelsql - #8257

Merged
Sovietaced merged 1 commit into
flyteorg:mainfrom
Sovietaced:otel-sql
Oct 31, 2026
Merged

Sovietaced merged 1 commit into
flyteorg:mainfrom
Sovietaced:otel-sql

Conversation

@Sovietaced

@Sovietaced Sovietaced commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Why are the changes needed?

I am performing scale testing of Flyte 2 and find metrics and tracing very helpful to debug performance issues. These metrics may also be helpful for users that wants to create alerts.

What changes were proposed in this pull request?

Add support for metrics + tracing with the otelsql library.

How was this patch tested?

Tested in our internal fork.

Screenshot 2026-10-27 at 1 26 55 PM Screenshot 2026-10-26 at 5 44 23 PM

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Stack

If you do use git town to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.

Docs link

@Sovietaced
Sovietaced force-pushed the otel-sql branch 3 times, most recently from 024829c to c1a8913 Compare October 27, 2026 20:06
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
@Sovietaced Sovietaced changed the title Add support for otelsql Add metrics + tracing for Postgres with otelsql Oct 27, 2026
// RegisterProvidersWithContext registers tracer and metric providers for the service.
// If already registered, the existing providers are reused.
func RegisterProvidersWithContext(ctx context.Context, serviceName string, config *Config) error {
if tracerProviders[serviceName] != nil && meterProviders[serviceName] != nil {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Added this because sometimes the DB OTEL is setup before the Redis OTEL of services. This gracefully handled duplicate registration.

@Sovietaced
Sovietaced marked this pull request as ready for review October 27, 2026 20:29
@Sovietaced
Sovietaced merged commit 6941ae0 into flyteorg:main Oct 31, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants