Skip to content

Commit

Permalink
nit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cnnradams committed Jul 20, 2020
1 parent 027e0b1 commit de4b7e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/opentelemetry-tracing.rst
Expand Up @@ -21,12 +21,12 @@ We also need to tell OpenTelemetry which exporter to use. For example, to export
# in a seperate thread to not block on the main thread
from opentelemetry.sdk.trace.export import BatchExportSpanProcessor
# create and export one trace every 1000 requests
# Create and export one trace every 1000 requests
sampler = ProbabilitySampler(1/1000)
# Uses the default tracer provider
# Use the default tracer provider
trace.set_tracer_provider(TracerProvider(sampler=sampler))
trace.get_tracer_provider().add_span_processor(
# initialize the cloud tracing exporter
# Initialize the cloud tracing exporter
BatchExportSpanProcessor(CloudTraceSpanExporter())
)
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/spanner_v1/_opentelemetry_tracing.py
Expand Up @@ -32,13 +32,13 @@
@contextmanager
def trace_call(name, session, extra_attributes=None):
if not HAS_OPENTELEMETRY_INSTALLED or not session:
# empty context manager. users will have to check if the generated value is None or a span
# Empty context manager. Users will have to check if the generated value is None or a span
yield None
return

tracer = trace.get_tracer(__name__)

# base attributes that we know for every trace created
# Set base attributes that we know for every trace created
attributes = {
"db.type": "spanner",
"db.url": spanner_client.SpannerClient.SERVICE_ADDRESS,
Expand Down

0 comments on commit de4b7e7

Please sign in to comment.