Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions contrib/opencensus-ext-azure/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

## Unreleased

## 1.1.15

Released 2025-06-03

- Switch ordering for Statsbeat Attach detection to prioritize Azure Functions
([#1251](https://github.com/census-instrumentation/opencensus-python/pull/1251))

## 1.1.14

Released 2025-01-06

- Remove status code `206` from retry code + only count batch level for statsbeat
([#1247](https://github.com/census-instrumentation/opencensus-python/pull/1247))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def _get_common_properties():
properties.append(LabelKey("cikey", 'customer ikey'))
properties.append(LabelKey("runtimeVersion", 'Python version'))
properties.append(LabelKey("os", 'os of application being instrumented'))
properties.append(LabelKey("language", 'Python'))
properties.append(LabelKey("language", 'python'))
properties.append(LabelKey("version", 'sdkVersion - version of the ext'))
return properties

Expand Down Expand Up @@ -412,17 +412,17 @@ def _get_attach_metric(self):
rp = ''
rpId = ''
# rp, rpId
if os.environ.get("WEBSITE_SITE_NAME") is not None:
if os.environ.get("FUNCTIONS_WORKER_RUNTIME") is not None:
# Function apps
rp = _RP_NAMES[1]
rpId = os.environ.get("WEBSITE_HOSTNAME")
elif os.environ.get("WEBSITE_SITE_NAME") is not None:
# Web apps
rp = _RP_NAMES[0]
rpId = '{}/{}'.format(
os.environ.get("WEBSITE_SITE_NAME"),
os.environ.get("WEBSITE_HOME_STAMPNAME", '')
)
elif os.environ.get("FUNCTIONS_WORKER_RUNTIME") is not None:
# Function apps
rp = _RP_NAMES[1]
rpId = os.environ.get("WEBSITE_HOSTNAME")
elif self._vm_retry and self._get_azure_compute_metadata():
# VM
rp = _RP_NAMES[2]
Expand Down
2 changes: 1 addition & 1 deletion contrib/opencensus-ext-azure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
install_requires=[
'azure-core >= 1.12.0, < 2.0.0',
'azure-identity >= 1.5.0, < 2.0.0',
'opencensus >= 0.12.dev0, < 1.0.0',
'opencensus >= 0.11.4, < 1.0.0',
'psutil >= 5.6.3',
'requests >= 2.19.0',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ def test_get_attach_metric_appsvc(self):
{
"FUNCTIONS_WORKER_RUNTIME": "runtime",
"WEBSITE_HOSTNAME": "host_name",
"WEBSITE_SITE_NAME": "site_name",
}
)
def test_get_attach_metric_functions(self):
Expand Down
Loading