Skip to content

feat: support propagation of OpenTelemetry context from clients with SQLcommenter #569

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

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

pdecat
Copy link
Contributor

@pdecat pdecat commented Jun 19, 2025

This PR is based on the branch from #568 and only adds commit 205fa75 to add support for propagating OpenTelemetry trace context with SQLcommenter which simplifies greatly usage:

import logging

import psycopg

from opentelemetry.instrumentation.psycopg import PsycopgInstrumentor

logger = logging.getLogger(__name__)

steampipe_conn = psycopg.connect(
    host="127.0.0.1",
    dbname="steampipe",
    user="steampipe",
    port="9193",
    password="steampipe",
    autocommit=True,
)

# Instrument psycopg with SQLcommenter enabled
PsycopgInstrumentor().instrument(enable_commenter=True)

steampipe_conn.execute("SELECT account_id FROM aws_account")
steampipe_conn.execute("SELECT arn FROM aws_health_event")

@pdecat pdecat changed the title feat/otel context propagation from client sqlcommenter feat: support propagation of OpenTelemetry context from clients with SQLcommenter Jun 19, 2025
@pdecat pdecat force-pushed the feat/otel_context_propagation_from_client_sqlcommenter branch 2 times, most recently from 1a019f4 to 205fa75 Compare June 19, 2025 09:17
@pskrbasu
Copy link
Contributor

pskrbasu commented Jul 8, 2025

@pdecat We have updated the module version to v2 in the develop branch and will release a new version soon.

We want to include these feat in our new version, could you please rebase your PR and resolve the conflicts(if any)?

@pdecat
Copy link
Contributor Author

pdecat commented Jul 8, 2025

Will do ASAP!

@pdecat pdecat force-pushed the feat/otel_context_propagation_from_client_sqlcommenter branch from 205fa75 to 633a423 Compare July 8, 2025 06:55
@pdecat
Copy link
Contributor Author

pdecat commented Jul 8, 2025

Rebase done!

@pskrbasu
Copy link
Contributor

pskrbasu commented Jul 8, 2025

Hi @pdecat,

Thank you so much for rebasing the PRs — we really appreciate you taking the time to make these changes 🙏

That said, we’ve decided to take a bit more time to properly test these features and ensure they’re well-documented before merging them in. Apologies for the change in plan, but given this, we won’t be including them in the upcoming release.

We’ll follow up with an RC version that includes these changes shortly after the current release goes out.

Thanks again for your support and patience!

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