GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — spanner_v1/trace: trace_call span attributes are hard-coded and don't follow OpenTelemetry semantic conventions; should instead use incorrect standardized OpenTelemetry attributes · Issue #1170 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

spanner_v1/trace: trace_call span attributes are hard-coded and don't follow OpenTelemetry semantic conventions; should instead use incorrect standardized OpenTelemetry attributes #1170

Copy link
Copy link
Closed
Closed
spanner_v1/trace: trace_call span attributes are hard-coded and don't follow OpenTelemetry semantic conventions; should instead use incorrect standardized OpenTelemetry attributes#1170
Copy link
Assignees
rahul2393
Labels
api: spannerIssues related to the googleapis/python-spanner API.

Description

@odeke-em
odeke-em
opened on Jul 24, 2024
Issue body actions

If we examine the code in here

python-spanner/google/cloud/spanner_v1/_opentelemetry_tracing.py

Lines 41 to 46 in fe20d41

attributes = {
"db.type": "spanner",
"db.url": SpannerClient.DEFAULT_ENDPOINT,
"db.instance": session._database.name,
"net.host.name": SpannerClient.DEFAULT_ENDPOINT,
}

Fixes

We should import the package opentelemetry.semconv.attributes and from it we can use the following imported variables

  • "db.type" should be DB_SYSTEM aka "db.system" = "google.cloud.spanner"
  • "db.instance_name" should be DB_NAME aka "db.name"
  • "db.url" should use DB_CONNECTION_STRING aka "db.connection_string"
  • "net.host.name" should use NET_HOST_NAME

The code in question was written in 2020, long before OpenTelemetry standardized semantic conventions hence I am sending over a change pretty shortly to fix this!

Activity

Next
  1. product-auto-label
    added
    api: spannerIssues related to the googleapis/python-spanner API.
    on Jul 24, 2024
  2. blunderbuss-gcf
    assigned
    rahul2393
    on Jul 24, 2024
  3. odeke-em
    added 13 commits that reference this issue on Jul 25, 2024

    fix: use standardized OpenTelemetry attributes when tracing

    This issue will close once commit 6732963 is merged into the 'main' branch.
    6732963

    fix: use standardized OpenTelemetry attributes when tracing

    This issue will close once commit 3e99517 is merged into the 'main' branch.
    3e99517

    fix: use standardized OpenTelemetry attributes when tracing

    This issue will close once commit dc7d3ae is merged into the 'main' branch.
    dc7d3ae

    fix: use standardized OpenTelemetry attributes when tracing

    This issue will close once commit a045aa5 is merged into the 'main' branch.
    a045aa5

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit ddc0057 is merged into the 'main' branch.
    ddc0057

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit 13c326d is merged into the 'main' branch.
    13c326d

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit 4d31d9d is merged into the 'main' branch.
    4d31d9d

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit c2801a5 is merged into the 'main' branch.
    c2801a5

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit c41c4e5 is merged into the 'main' branch.
    c41c4e5

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit ed8f987 is merged into the 'main' branch.
    ed8f987

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit ad15b89 is merged into the 'main' branch.
    ad15b89

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit b43e4f1 is merged into the 'main' branch.
    b43e4f1

    fix: use modernized and standardized OpenTelemetry when tracing

    This issue will close once commit b83a4df is merged into the 'main' branch.
    b83a4df
  4. 34 remaining items

  5. odeke-em
    added 3 commits that reference this issue on Sep 19, 2024

    observability: annotate Session+SessionPool events

    f71d05c

    observability: annotate Session+SessionPool events

    eb9dd5a

    observability: annotate Session+SessionPool events

    f59084c
  6. odeke-em
    added 7 commits that reference this issue on Nov 3, 2024

    observability: annotate Session+SessionPool events

    c94ba6b

    observability: annotate Session+SessionPool events

    20565f9

    observability: annotate Session+SessionPool events

    f0ee013

    observability: annotate Session+SessionPool events

    2bd9168

    observability: annotate Session+SessionPool events

    021a64c

    observability: annotate Session+SessionPool events

    0207a8e

    observability: annotate Session+SessionPool events

    9b3c5bb
  7. odeke-em
    added 3 commits that reference this issue on Dec 3, 2024

    observability: annotate Session+SessionPool events

    1a1b59c

    observability: annotate Session+SessionPool events

    350c4e1

    observability: annotate Session+SessionPool events

    1d7e440
  8. harshachinta
    added a commit that references this issue on Dec 6, 2024

    observability: annotate Session+SessionPool events (#1207)

    a6811af
  9. odeke-em
    closed this as completedon Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rahul2393
    rahul2393

Labels

api: spannerIssues related to the googleapis/python-spanner API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.