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

Specifying custom tag names does not work #5196

Open
thompson-tomo opened this issue Jun 3, 2024 · 1 comment
Open

Specifying custom tag names does not work #5196

thompson-tomo opened this issue Jun 3, 2024 · 1 comment
Labels
area-telemetry bug This issue describes a behavior which is not expected - a bug.

Comments

@thompson-tomo
Copy link

I am trying to use custom names for my properties however that attribute is not working. For reference my log generator is as follows:

[LoggerMessage(
            EventId = 0,
            Message = "Have recorded metric")]
        public static partial void RecordMetric(
#pragma warning disable EXTEXP0003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
            this ILogger logger, LogLevel logLevel, [LogProperties(SkipNullProperties = true)] [TagName("test")] MetricDef metric, [LogProperties(SkipNullProperties = true)] MetricDescriptorDef descriptor, [LogProperties(SkipNullProperties = true)] EventDef @event);
#pragma warning restore EXTEXP0003 // Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.

The code compiles but the property doesn't change name. to reflect.

Let me know if this needs to become a feature request.

@joperezr joperezr added bug This issue describes a behavior which is not expected - a bug. area-telemetry and removed untriaged labels Jun 19, 2024
@joperezr
Copy link
Member

cc: @xakep139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-telemetry bug This issue describes a behavior which is not expected - a bug.
Projects
None yet
Development

No branches or pull requests

2 participants