Skip to content

Commit

Permalink
Add consts for OpenTelemetry semantic conventions (#30)
Browse files Browse the repository at this point in the history
* Add consts for OpenTelemetry semantic conventions

* minor fix

* Review updates

* Review updates

* Review updates
  • Loading branch information
andmat900 authored Apr 29, 2024
1 parent ab75ff2 commit b10f662
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/etos_lib/opentelemetry/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2020 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""ETOS OpenTelemetry module."""
43 changes: 43 additions & 0 deletions src/etos_lib/opentelemetry/semconv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2020 Axis Communications AB.
#
# For a full list of individual contributors, please see the commit history.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""ETOS OpenTelemetry semantic conventions module."""
from dataclasses import dataclass


@dataclass(frozen=True)
class Attributes:
"""Constants for ETOS OpenTelemetry semantic conventions."""

# General ETOS conventions
SUITE_ID = "etos.suite.id"
SUBSUITE_ID = "etos.subsuite.id"
TESTRUN_ID = "etos.testrun.id"

# Test Runner conventions
TEST_RUNNER_ID = "etos.test_runner.id"

# Suite Runner conventions
SUITE_RUNNER_JOB_ID = "etos.suite_runner.job.id"

# Environment generic conventions
ENVIRONMENT = "etos.subsuite.environment" # environment description as JSON
ENVIRONMENT_ID = "etos.environment.id"

# Execution space conventions
EXECUTOR_ID = "etos.environment.execution_space.executor.id"

# IUT conventions
IUT_DESCRIPTION = "etos.environment.iut.description"

0 comments on commit b10f662

Please sign in to comment.