Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andmat900 committed Apr 22, 2024
1 parent 8329071 commit 6ae101b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
LOGGER = logging.getLogger(__name__)

# Setting OTEL_COLLECTOR_HOST will override the default OTEL collector endpoint.
# This is needed when using the centralized cluster-level OTEL collector instead of sidecar collector.
# This is needed when using the cluster-level OTEL collector instead of sidecar collector.
if os.getenv("OTEL_COLLECTOR_HOST"):
os.environ["OTEL_EXPORTER_OTLP_TRACES_ENDPOINT"] = os.getenv("OTEL_COLLECTOR_HOST")
LOGGER.info("Using OTEL collector: %s", os.getenv("OTEL_COLLECTOR_HOST"))
Expand Down
1 change: 0 additions & 1 deletion projects/etos_suite_runner/src/etos_suite_runner/esr.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# limitations under the License.
# -*- coding: utf-8 -*-
"""ETOS suite runner module."""
import json
import logging
import os
import signal
Expand Down
11 changes: 6 additions & 5 deletions projects/etos_suite_runner/src/etos_suite_runner/lib/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ def start(self, identifier: str, otel_context: opentelemetry.context.context.Con
:param identifier: An identifier for logs in this sub suite.
"""
# OpenTelemetry context needs to be retrieved here, since the subsuite is running in a separate process
# OpenTelemetry context needs to be retrieved here:
# the subsuite is running in a separate process
span_name = "execute_testrunner"
with self.otel_tracer.start_as_current_span(span_name, context=otel_context) as span:
span.set_attribute("subsuite_id", identifier)
Expand Down Expand Up @@ -175,10 +176,10 @@ class TestSuite: # pylint:disable=too-many-instance-attributes
__activity_finished = None

def __init__(self,
etos: ETOS,
params: ESRParameters,
suite: dict,
otel_context: opentelemetry.context.context.Context = None
etos: ETOS,
params: ESRParameters,
suite: dict,
otel_context: opentelemetry.context.context.Context = None
) -> None:
"""Initialize a TestSuite instance."""
self.etos = etos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# -*- coding: utf-8 -*-
"""OpenTelemetry-related code."""
import logging
import os
import opentelemetry
Expand Down

0 comments on commit 6ae101b

Please sign in to comment.