Skip to content

Commit 2e4130d

Browse files
authored
Merge branch 'main' into main
2 parents 062c1b8 + 0db4d0b commit 2e4130d

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

RELEASING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ The workflow will create two pull requests, one against the `main` and one again
4141
* Press the "Run workflow" button, then select the release branch from the dropdown list,
4242
e.g. `release/v1.9.x`, then enter the pull request number that you want to backport,
4343
then click the "Run workflow" button below that.
44+
* Add the label `backport` to the generated pull request.
45+
* In case label automation doesn't work, just close and reopen the PR so that the workflow will take into account the label automation we have in place.
4446
* Review and merge the backport pull request that it generates.
4547
* Merge a pull request to the release branch updating the `CHANGELOG.md`.
4648
* The heading for the unreleased entries should be `## Unreleased`.
4749
* Run the [Prepare patch release workflow](https://github.com/open-telemetry/opentelemetry-python-contrib/actions/workflows/prepare-patch-release.yml).
4850
* Press the "Run workflow" button, then select the release branch from the dropdown list,
4951
e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
5052
* Review and merge the pull request that it creates for updating the version.
53+
* Note: If you are doing a patch release in `-contrib` repo, you should also do an equivalent patch release in `-core` repo (even if there's no fix to release), otherwise tests in CI will fail.
5154

5255
### Preparing a patch release for individual package
5356

instrumentation/opentelemetry-instrumentation-elasticsearch/tests/test_elasticsearch.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
ElasticsearchInstrumentor,
3232
)
3333
from opentelemetry.instrumentation.elasticsearch.utils import sanitize_body
34-
from opentelemetry.semconv.trace import SpanAttributes
34+
from opentelemetry.semconv._incubating.attributes.db_attributes import (
35+
DB_STATEMENT,
36+
DB_SYSTEM,
37+
)
3538
from opentelemetry.test.test_base import TestBase
3639
from opentelemetry.trace import StatusCode
3740

@@ -76,15 +79,15 @@ def get_elasticsearch_client(*args, **kwargs):
7679
)
7780
class TestElasticsearchIntegration(TestBase):
7881
search_attributes = {
79-
SpanAttributes.DB_SYSTEM: "elasticsearch",
82+
DB_SYSTEM: "elasticsearch",
8083
"elasticsearch.url": "/test-index/_search",
8184
"elasticsearch.method": helpers.dsl_search_method,
8285
"elasticsearch.target": "test-index",
83-
SpanAttributes.DB_STATEMENT: str({"query": {"bool": {"filter": "?"}}}),
86+
DB_STATEMENT: str({"query": {"bool": {"filter": "?"}}}),
8487
}
8588

8689
create_attributes = {
87-
SpanAttributes.DB_SYSTEM: "elasticsearch",
90+
DB_SYSTEM: "elasticsearch",
8891
"elasticsearch.url": "/test-index",
8992
"elasticsearch.method": "HEAD",
9093
}
@@ -361,13 +364,13 @@ def test_dsl_create(self, request_mock):
361364
)
362365

363366
attributes = {
364-
SpanAttributes.DB_SYSTEM: "elasticsearch",
367+
DB_SYSTEM: "elasticsearch",
365368
"elasticsearch.url": "/test-index",
366369
"elasticsearch.method": "PUT",
367370
}
368371
self.assertSpanHasAttributes(span2, attributes)
369372
self.assertEqual(
370-
literal_eval(span2.attributes[SpanAttributes.DB_STATEMENT]),
373+
literal_eval(span2.attributes[DB_STATEMENT]),
371374
helpers.dsl_create_statement,
372375
)
373376

@@ -408,13 +411,13 @@ def test_dsl_index(self, request_mock):
408411
span = spans[0]
409412
self.assertEqual(span.name, helpers.dsl_index_span_name)
410413
attributes = {
411-
SpanAttributes.DB_SYSTEM: "elasticsearch",
414+
DB_SYSTEM: "elasticsearch",
412415
"elasticsearch.url": helpers.dsl_index_url,
413416
"elasticsearch.method": "PUT",
414417
}
415418
self.assertSpanHasAttributes(span, attributes)
416419
self.assertEqual(
417-
literal_eval(span.attributes[SpanAttributes.DB_STATEMENT]),
420+
literal_eval(span.attributes[DB_STATEMENT]),
418421
{
419422
"body": "A few words here, a few words there",
420423
"title": "About searching",

0 commit comments

Comments
 (0)