Skip to content

Commit

Permalink
add otel_url config option
Browse files Browse the repository at this point in the history
This option will point to the OpenTelemetry
Collector root URL.

This is where all opentelemetry traces will be sent.

* MMENG-3834

Signed-off-by: Harsh Modi <[email protected]>
  • Loading branch information
hjmodi committed Sep 14, 2023
1 parent 0a77372 commit dc0967f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/configuration_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Some options are also mandatory.

- `openshift_uri` (mandatory, str): root URL where openshift master API server
is listening (e.g. 'localhost:8443')
- `otel_url` (optional, str): root URL where opentelemetry collector is
listening (e.g. 'localhost:4318')
- `git_url` (optional, str): URL of git repository where dockerfile lives (it is
used to perform `git clone`)
- `git_ref` (optional, str): name of git ref (branch/commit) to check out
Expand Down
10 changes: 10 additions & 0 deletions osbs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ def get_openshift_base_uri(self):
val = self._get_value(key, self.conf_section, key)
return val

def get_otel_url(self):
"""
https://<host>[:<port>]/
:return: str
"""
key = "otel_url"
val = self._get_value(key, self.conf_section, key)
return val

@staticmethod
def get_k8s_api_version():
# This is not configurable.
Expand Down

0 comments on commit dc0967f

Please sign in to comment.