Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Nov 21, 2023
2 parents 5e53795 + 259a02f commit 3a4c4e9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 11 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,24 @@

* [Protobuf](./protobuf/README.md)
* [Semantic Convention Generator](./semantic-conventions/README.md)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

### Approvers

- OpenTelemetry Specification Approvers ([@open-telemetry/specs-approvers](https://github.com/orgs/open-telemetry/teams/specs-approvers))
- See [open-telemetry/community](https://github.com/open-telemetry/community/blob/main/community-members.md#specifications-and-proto) for the current list.

_Find more about the approver role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#approver)._

### Maintainers

- OpenTelemetry Technical Committee ([@open-telemetry/technical-committee](https://github.com/orgs/open-telemetry/teams/technical-committee))
- See [open-telemetry/community](https://github.com/open-telemetry/community/blob/main/community-members.md#technical-committee) for the current list.
- OpenTelemetry Semantic Conventions Maintainers ([@open-telemetry/specs-semconv-maintainers](https://github.com/orgs/open-telemetry/teams/specs-semconv-maintainers))
for the [Semantic Convention Generator](./semantic-conventions/README.md) sub-project.
- See [open-telemetry/semantic-conventions](https://github.com/open-telemetry/semantic-conventions#contributing) for the current list.

_Find more about the maintainer role in [community repository](https://github.com/open-telemetry/community/blob/master/community-membership.md#maintainer)._
5 changes: 5 additions & 0 deletions semantic-conventions/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Please update the changelog as part of any significant pull request.

## Unreleased

## v0.23.0

- Rephrase and relax sampling-relevant description
([#230](https://github.com/open-telemetry/build-tools/pull/230))

## v0.22.0

- When an attribute is referenced using `ref:` from a group that already inherits the attribute with `extends:`, resolve the reference to the closest inherited attribute instead of the primary definition. This makes a difference in case the inherited reference overwrites any properties.
Expand Down
4 changes: 2 additions & 2 deletions semantic-conventions/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==22.3.0
mypy==0.910
pytest==6.2.5
flake8==3.9.2
pylint==2.15.5
flake8==6.1.0
pylint==3.0.2
isort==5.12.0
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ def check_unique_fqns(self):
group_by_fqn[attr.fqn] = model.semconv_id

def finish(self):
"""Resolves values referenced from other models using `ref` and `extends` attributes AFTER all models were parsed.
"""Resolves values referenced from other models using `ref` and `extends` attributes
AFTER all models were parsed.
Here, sanity checks for `ref/extends` attributes are performed.
"""
# Before resolving attributes, we verify that no duplicate exists.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

import re
from typing import Tuple
from typing import Tuple # noqa: F401

from opentelemetry.semconv.model.exceptions import ValidationError

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def derive_requirement_level(self, attribute: SemanticAttribute):
else:
# We put the condition in the notes after the table
self.render_ctx.add_note(attribute.requirement_level_msg)
required = f"Conditionally Required: [{ len(self.render_ctx.notes)}]"
required = f"Conditionally Required: [{len(self.render_ctx.notes)}]"
elif attribute.requirement_level == RequirementLevel.OPT_IN:
required = "Opt-In"
else: # attribute.requirement_level == Required.RECOMMENDED or None
Expand Down Expand Up @@ -293,8 +293,8 @@ def to_creation_time_attributes(
"""
if sampling_relevant_attrs:
output.write(
"\nFollowing attributes MUST be provided **at span creation time** (when provided at all), "
+ "so they can be considered for sampling decisions:\n\n"
"\nThe following attributes can be important for making sampling decisions "
+ "and SHOULD be provided **at span creation time** (if provided at all):\n\n"
)

for attr in sampling_relevant_attrs:
Expand Down Expand Up @@ -391,7 +391,7 @@ def to_markdown_constraint(
if isinstance(obj, AnyOf):
self.to_markdown_anyof(obj, output)
elif not isinstance(obj, Include):
raise Exception(f"Trying to generate Markdown for a wrong type {type(obj)}")
raise TypeError(f"Trying to generate Markdown for a wrong type {type(obj)}")

def render_md(self):
for md_filename in self.file_names:
Expand Down Expand Up @@ -429,7 +429,6 @@ def _create_attribute_location_dict(self):
raise ValueError(
f"Semantic Convention ID {semconv_id} not found"
)
a: SemanticAttribute
valid_attr = (
a
for a in semconv.attributes_and_templates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

**[1]:** Note on the overridden attribute definition.

Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions:
The following attributes can be important for making sampling decisions and SHOULD be provided **at span creation time** (if provided at all):

* [`server.address`](input_server.md)
<!-- endsemconv -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

**[1]:** `http.url` MUST NOT contain credentials passed via URL in form of `https://username:[email protected]/`. In such case the attribute's value should be `https://www.example.com/`.

Following attributes MUST be provided **at span creation time** (when provided at all), so they can be considered for sampling decisions:
The following attributes can be important for making sampling decisions and SHOULD be provided **at span creation time** (if provided at all):

* `http.host`
* `http.method`
Expand Down

0 comments on commit 3a4c4e9

Please sign in to comment.