Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collisions: manual conflict resolution #76

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fun generateTask(taskName: String, incubating: Boolean) {
"-v", "$buildDir/semantic-conventions-${semanticConventionsVersion}/model:/source",
"-v", "$projectDir/buildscripts/templates:/templates",
"-v", "$projectDir/$outputDir:/output",
"library/semconvgen2",
"otel/semconvgen:$generatorVersion",
"--yaml-root", "/source",
"--continue-on-validation-errors", "compatibility",
"code",
Expand Down
6 changes: 5 additions & 1 deletion buildscripts/templates/SemanticAttributes.java.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
{%- set filtered_enums = filtered_attributes | selectattr('is_enum', 'equalto', true) | list %}
{%- set excluded_namespaces_list = excluded_namespaces.replace("\"", "").split(' ') %}
{%- if root_namespace not in excluded_namespaces_list and filtered_attributes | count > 0 %}
{%- set name_map ={"messaging.client.id":"messaging_client_id2"} -%}
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
{%- macro to_const_name2(fqn) -%}
{{(name_map[fqn] or fqn) | to_const_name}}
{%- endmacro %}
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
Expand All @@ -64,7 +68,7 @@ import java.util.List;
public final class {{ root_namespace | to_camelcase(True) }}{{ classPrefix }}Attributes {
{%- for attribute in filtered_attributes %}

{% set attribute_const_name = attribute.fqn | to_const_name -%}
{% set attribute_const_name = to_const_name2(attribute.fqn) -%}
/**
* {{attribute.brief | render_markdown(code="{{@code {0}}}", paragraph="{0}")}}
{%- if attribute.note %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,15 @@ public final class MessagingIncubatingAttributes {
longKey("messaging.batch.message_count");

/** A unique identifier for the client that consumes or produces a message. */
public static final AttributeKey<String> MESSAGING_CLIENT_ID = stringKey("messaging.client.id");
public static final AttributeKey<String> MESSAGING_CLIENT_ID2 = stringKey("messaging.client.id");

/**
* Deprecated, use {@code messaging.client.id} instead.
*
* @deprecated Deprecated, use `messaging.client.id` instead.
*/
@Deprecated
public static final AttributeKey<String> MESSAGING_CLIENT_ID = stringKey("messaging.client_id");

/**
* A boolean that is true if the message destination is anonymous (could be unnamed or have
Expand Down
Loading