Skip to content

Commit

Permalink
Use simple processor in http examples
Browse files Browse the repository at this point in the history
  • Loading branch information
c24t committed Feb 28, 2020
1 parent c2ba065 commit 393f43a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/http/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from opentelemetry.ext.wsgi import OpenTelemetryMiddleware
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchExportSpanProcessor,
ConsoleSpanExporter,
SimpleExportSpanProcessor,
)

if os.getenv("EXPORTER") == "jaeger":
Expand All @@ -45,7 +45,7 @@
tracer = trace.get_tracer(__name__)

# SpanExporter receives the spans and send them to the target location.
span_processor = BatchExportSpanProcessor(exporter)
span_processor = SimpleExportSpanProcessor(exporter)
trace.tracer_provider().add_span_processor(span_processor)

# Integrations are the glue that binds the OpenTelemetry API and the
Expand Down
5 changes: 2 additions & 3 deletions examples/http/tracer_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
# limitations under the License.

import os

import requests

from opentelemetry import trace
from opentelemetry.ext import http_requests
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchExportSpanProcessor,
ConsoleSpanExporter,
SimpleExportSpanProcessor,
)

if os.getenv("EXPORTER") == "jaeger":
Expand All @@ -43,7 +42,7 @@
tracer_provider = trace.tracer_provider()

# SpanExporter receives the spans and send them to the target location.
span_processor = BatchExportSpanProcessor(exporter)
span_processor = SimpleExportSpanProcessor(exporter)
tracer_provider.add_span_processor(span_processor)

# Integrations are the glue that binds the OpenTelemetry API and the
Expand Down

0 comments on commit 393f43a

Please sign in to comment.