-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add fully support to export traces with http #1365
Add fully support to export traces with http #1365
Conversation
elif nipap_config.has_option("tracing", "otlp_http_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_http_endpoint")) | ||
else: | ||
raise NipapConfigError("Tracing enabled but no OTLP endpoint configured") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (89 > 79 characters)
nipap-www/nipapwww/__init__.py
Outdated
if nipap_config.has_option("tracing", "otlp_grpc_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint"), True) | ||
elif nipap_config.has_option("tracing", "otlp_http_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_http_endpoint")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (106 > 79 characters)
nipap-www/nipapwww/__init__.py
Outdated
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint")) | ||
|
||
if nipap_config.has_option("tracing", "otlp_grpc_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint"), True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (112 > 79 characters)
if use_grpc: | ||
processor = BatchSpanProcessor(OTLPSpanExporter(endpoint=endpoint)) | ||
else: | ||
processor = BatchSpanProcessor(opentelemetry.exporter.otlp.proto.http.trace_exporter.OTLPSpanExporter(endpoint=endpoint)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (133 > 79 characters)
pynipap/tracing.py
Outdated
@@ -22,7 +22,7 @@ | |||
tracer = trace.get_tracer("pynipap") | |||
|
|||
|
|||
def init_tracing(service_name, endpoint, use_grpc=True): | |||
def init_tracing(service_name, endpoint, use_grpc=False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many blank lines (2)
c4a93f4
to
4f3a8f5
Compare
if nipap_config.has_option("tracing", "otlp_grpc_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint")) | ||
elif nipap_config.has_option("tracing", "otlp_http_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_http_endpoint"), False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (113 > 79 characters)
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint")) | ||
|
||
if nipap_config.has_option("tracing", "otlp_grpc_endpoint"): | ||
nipap.tracing.init_tracing("nipap-www", nipap_config.get("tracing", "otlp_grpc_endpoint")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (106 > 79 characters)
4f3a8f5
to
a5264ca
Compare
LGTM! |
No description provided.