Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-opentelemetry-util-http for 
openSUSE:Factory checked in at 2026-01-06 17:43:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-util-http (Old)
 and      /work/SRC/openSUSE:Factory/.python-opentelemetry-util-http.new.1928 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-opentelemetry-util-http"

Tue Jan  6 17:43:03 2026 rev:7 rq:1325574 version:0.60b0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-opentelemetry-util-http/python-opentelemetry-util-http.changes
    2025-11-21 16:56:45.450560438 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-opentelemetry-util-http.new.1928/python-opentelemetry-util-http.changes
  2026-01-06 17:43:59.864181360 +0100
@@ -1,0 +2,17 @@
+Sun Dec 28 15:17:28 UTC 2025 - Dirk Müller <[email protected]>
+
+- update to 0.60b0:
+  * Silence events API warnings for internal users
+  * `opentelemetry-api`: Convert objects of any type other than
+    AnyValue in attributes to string to be exportable
+  * docs: Added sqlcommenter example
+  * build: bump ruff to 0.14.1
+  * Add `opentelemetry-exporter-credential-provider-gcp` as an
+    optional dependency to `opentelemetry-exporter-otlp-proto-
+    grpc`  and `opentelemetry-exporter-otlp-proto-http`
+  * semantic-conventions: Bump to 1.38.0
+  * [BREAKING] Remove LogData and extend SDK LogRecord to have
+    instrumentation scope
+  * [BREAKING] Rename several classes from Log to LogRecord
+
+-------------------------------------------------------------------

Old:
----
  opentelemetry_util_http-0.59b0.tar.gz

New:
----
  opentelemetry_util_http-0.60b0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-opentelemetry-util-http.spec ++++++
--- /var/tmp/diff_new_pack.Jq2j5A/_old  2026-01-06 17:44:00.408203243 +0100
+++ /var/tmp/diff_new_pack.Jq2j5A/_new  2026-01-06 17:44:00.412203405 +0100
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-opentelemetry-util-http
-Version:        0.59b0
+Version:        0.60b0
 Release:        0
 Summary:        Instrumentation Tools & Auto Instrumentation for OpenTelemetry 
Python
 License:        Apache-2.0

++++++ opentelemetry_util_http-0.59b0.tar.gz -> 
opentelemetry_util_http-0.60b0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/opentelemetry_util_http-0.59b0/PKG-INFO 
new/opentelemetry_util_http-0.60b0/PKG-INFO
--- old/opentelemetry_util_http-0.59b0/PKG-INFO 2020-02-02 01:00:00.000000000 
+0100
+++ new/opentelemetry_util_http-0.60b0/PKG-INFO 2020-02-02 01:00:00.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: opentelemetry-util-http
-Version: 0.59b0
+Version: 0.60b0
 Summary: Web util for OpenTelemetry
 Project-URL: Homepage, 
https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/util/opentelemetry-util-http
 Project-URL: Repository, 
https://github.com/open-telemetry/opentelemetry-python-contrib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/__init__.py 
new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/__init__.py
--- old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/__init__.py  
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/__init__.py  
2020-02-02 01:00:00.000000000 +0100
@@ -19,7 +19,7 @@
 from re import IGNORECASE as RE_IGNORECASE
 from re import compile as re_compile
 from re import search
-from typing import Callable, Iterable, overload
+from typing import Callable, Iterable, Optional, overload
 from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
 
 from opentelemetry.semconv._incubating.attributes.http_attributes import (
@@ -34,6 +34,10 @@
     NET_HOST_NAME,
     NET_HOST_PORT,
 )
+from opentelemetry.semconv._incubating.attributes.user_agent_attributes import 
(
+    UserAgentSyntheticTypeValues,
+)
+from opentelemetry.util.http.constants import BOT_PATTERNS, TEST_PATTERNS
 
 OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS = (
     "OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS"
@@ -301,3 +305,30 @@
     url = remove_url_credentials(url)
     url = redact_query_parameters(url)
     return url
+
+
+def detect_synthetic_user_agent(user_agent: Optional[str]) -> Optional[str]:
+    """
+    Detect synthetic user agent type based on user agent string contents.
+
+    Args:
+        user_agent: The user agent string to analyze
+
+    Returns:
+        UserAgentSyntheticTypeValues.TEST if user agent contains any pattern 
from TEST_PATTERNS
+        UserAgentSyntheticTypeValues.BOT if user agent contains any pattern 
from BOT_PATTERNS
+        None otherwise
+
+    Note: Test patterns take priority over bot patterns.
+    """
+    if not user_agent:
+        return None
+
+    user_agent_lower = user_agent.lower()
+
+    if any(test_pattern in user_agent_lower for test_pattern in TEST_PATTERNS):
+        return UserAgentSyntheticTypeValues.TEST.value
+    if any(bot_pattern in user_agent_lower for bot_pattern in BOT_PATTERNS):
+        return UserAgentSyntheticTypeValues.BOT.value
+
+    return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/constants.py 
new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/constants.py
--- old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/constants.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/constants.py 
2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,34 @@
+# Copyright The OpenTelemetry Authors
+#
+# 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.
+
+"""
+Constants for OpenTelemetry HTTP utilities.
+
+This module contains configuration constants and pattern definitions used
+by HTTP instrumentation utilities for various features like synthetic user
+agent detection.
+"""
+
+# Test patterns to detect in user agent strings (case-insensitive)
+# These patterns indicate synthetic test traffic
+TEST_PATTERNS = [
+    "alwayson",
+]
+
+# Bot patterns to detect in user agent strings (case-insensitive)
+# These patterns indicate automated bot traffic
+BOT_PATTERNS = [
+    "googlebot",
+    "bingbot",
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/version.py 
new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/version.py
--- old/opentelemetry_util_http-0.59b0/src/opentelemetry/util/http/version.py   
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_util_http-0.60b0/src/opentelemetry/util/http/version.py   
2020-02-02 01:00:00.000000000 +0100
@@ -12,4 +12,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__version__ = "0.59b0"
+__version__ = "0.60b0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/opentelemetry_util_http-0.59b0/tests/test_detect_synthetic_user_agent.py 
new/opentelemetry_util_http-0.60b0/tests/test_detect_synthetic_user_agent.py
--- 
old/opentelemetry_util_http-0.59b0/tests/test_detect_synthetic_user_agent.py    
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/opentelemetry_util_http-0.60b0/tests/test_detect_synthetic_user_agent.py    
    2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,88 @@
+# Copyright The OpenTelemetry Authors
+#
+# 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.
+
+import unittest
+
+from opentelemetry.semconv._incubating.attributes.user_agent_attributes import 
(
+    UserAgentSyntheticTypeValues,
+)
+from opentelemetry.util.http import detect_synthetic_user_agent
+
+
+class TestDetectSyntheticUserAgent(unittest.TestCase):
+    def test_detect_bot_googlebot(self):
+        """Test detection of googlebot user agent."""
+        user_agent = "Mozilla/5.0 (compatible; Googlebot/2.1; 
+http://www.google.com/bot.html)"
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.BOT.value)
+
+    def test_detect_bot_bingbot(self):
+        """Test detection of bingbot user agent."""
+        user_agent = "Mozilla/5.0 (compatible; bingbot/2.0; 
+http://www.bing.com/bingbot.htm)"
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.BOT.value)
+
+    def test_detect_test_alwayson(self):
+        """Test detection of alwayson test user agent."""
+        user_agent = "AlwaysOn-Monitor/1.0"
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.TEST.value)
+
+    def test_case_insensitive_detection(self):
+        """Test that detection is case insensitive."""
+        # Test uppercase patterns
+        user_agent_bot = "GOOGLEBOT/2.1"
+        result = detect_synthetic_user_agent(user_agent_bot)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.BOT.value)
+
+        user_agent_test = "ALWAYSON-Monitor/1.0"
+        result = detect_synthetic_user_agent(user_agent_test)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.TEST.value)
+
+    def test_normal_user_agent_not_detected(self):
+        """Test that normal browser user agents are not detected as 
synthetic."""
+        user_agent = (
+            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
+        )
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertIsNone(result)
+
+    def test_none_user_agent(self):
+        """Test that None user agent returns None."""
+        result = detect_synthetic_user_agent(None)
+        self.assertIsNone(result)
+
+    def test_empty_user_agent(self):
+        """Test that empty user agent returns None."""
+        result = detect_synthetic_user_agent("")
+        self.assertIsNone(result)
+
+    def test_substring_match(self):
+        """Test that substrings are detected correctly."""
+        # Test googlebot in middle of string
+        user_agent = "MyApp/1.0 googlebot crawler"
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.BOT.value)
+
+        # Test alwayson in middle of string
+        user_agent = "TestFramework/1.0 alwayson monitoring"
+        result = detect_synthetic_user_agent(user_agent)
+        self.assertEqual(result, UserAgentSyntheticTypeValues.TEST.value)
+
+    def test_priority_test_over_bot(self):
+        """Test that test patterns take priority over bot patterns."""
+        user_agent = "alwayson-googlebot/1.0"
+        result = detect_synthetic_user_agent(user_agent)
+        # alwayson should be checked first and return 'test'
+        self.assertEqual(result, UserAgentSyntheticTypeValues.TEST.value)

Reply via email to