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 25a6ec0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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
2 changes: 1 addition & 1 deletion tests/system/test_system.py
Expand Up @@ -2513,7 +2513,7 @@ def test_execute_sql_returning_transfinite_floats(self):
)
)
self.assertEqual(len(rows), 1)
(float_array,) = rows[0]
float_array = rows[0]
self.assertEqual(float_array[0], float("-inf"))
self.assertEqual(float_array[1], float("+inf"))
# NaNs cannot be searched for by equality.
Expand Down

0 comments on commit 25a6ec0

Please sign in to comment.