Skip to content

Commit 03eec54

Browse files
committed
Generalizing naming for VCS properties
1 parent 972f07f commit 03eec54

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

middleware/distro.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def custom_record_exception(span: Span, exc: Exception):
148148
current_exc = sys.exc_info()[1] # Get the currently active exception
149149
exception_escaped = current_exc is exc # True if it's still propagating
150150

151-
mw_git_repository_url = os.getenv("MW_GIT_REPOSITORY_URL")
152-
mw_git_commit_sha = os.getenv("MW_GIT_COMMIT_SHA")
151+
mw_vcs_repository_url = os.getenv("MW_VCS_REPOSITORY_URL")
152+
mw_vcs_commit_sha = os.getenv("MW_VCS_COMMIT_SHA")
153153

154154
# Serialize stack info as JSON string since OpenTelemetry only supports string values
155155
stack_info_str = json.dumps(stack_info, indent=2)
@@ -162,8 +162,8 @@ def custom_record_exception(span: Span, exc: Exception):
162162
"exception.message": exc_value,
163163
"exception.stacktrace": traceback.format_exc(),
164164
"exception.escaped": exception_escaped,
165-
"exception.github.commit_sha": mw_git_commit_sha or "",
166-
"exception.github.repository_url": mw_git_repository_url or "",
165+
"exception.vcs.commit_sha": mw_vcs_commit_sha or "",
166+
"exception.vcs.repository_url": mw_vcs_repository_url or "",
167167
"exception.stack_details": stack_info_str, # Attach full stacktrace details
168168
}
169169
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "middleware-io"
7-
version = "2.1.2rc3"
7+
version = "2.1.2rc4"
88
requires-python = ">=3.8"
99
description = "Middleware's APM tool enables Python developers to effortlessly monitor their applications, gathering distributed tracing, metrics, logs, and profiling data for valuable insights and performance optimization."
1010
authors = [{ name = "middleware-dev" }]

0 commit comments

Comments
 (0)