Skip to content

[transator/azurelogs] Add support for the remaining activity logs categories#44871

Merged
atoulme merged 11 commits intoopen-telemetry:mainfrom
zmoog:zmoog/pkg/translator/azurelogs/activitylogs-complete
Jan 21, 2026
Merged

[transator/azurelogs] Add support for the remaining activity logs categories#44871
atoulme merged 11 commits intoopen-telemetry:mainfrom
zmoog:zmoog/pkg/translator/azurelogs/activitylogs-complete

Conversation

@zmoog
Copy link
Contributor

@zmoog zmoog commented Dec 10, 2025

Description

Includes support for all the remaining seven Activity log categories:

  • Administrative
  • Alert
  • Autoscale
  • Policy
  • Resource Health
  • Security
  • Service Health

The PR is built on top of the PR #43220 that added support for the Recommendation log category.

It applies the same philosophy:

  • Capture the recurring data structures as much as possible (e.g., Identity).
  • Map a field when it's definitely useful; don't map a field if in doubt—we can still add it later.

Note for reviewers: I'm not 100% on the field naming convention, so your feedback and insight are really needed here.

Link to tracking issue

N/A

Testing

I collected some sample logs from actual Azure and anonymized a little bit for the following log categories:

  • Administrative
  • Policy
  • ResourceHealth
  • ServiceHealth

However, I wasn't able to get actual log events for the following categories, so I inferred them from samples available in the Azure docs (which seems to use the Log Analytics Workspace format):

  • Alert
  • Autoscale
  • Security

Please pay extra attention when reviewing these categories, and please let me know if you're able to share some actual samples from Azure.

Documentation

N/A

@zmoog zmoog force-pushed the zmoog/pkg/translator/azurelogs/activitylogs-complete branch from e84b5d8 to f452454 Compare December 10, 2025 10:29
@zmoog zmoog marked this pull request as ready for review December 10, 2025 10:29
@zmoog zmoog requested review from a team and atoulme as code owners December 10, 2025 10:29
@zmoog
Copy link
Contributor Author

zmoog commented Dec 10, 2025

Hey @thompson-tomo, thank you for kicking off the review! All the suggestions I see make sense. What are the best resources to get started with naming conventions in semconv, so I can avoid making n00b choices?

@thompson-tomo
Copy link
Contributor

thompson-tomo commented Dec 10, 2025

No worries at all. A good place to start would be https://opentelemetry.io/docs/specs/semconv/general/naming/ & https://opentelemetry.io/docs/specs/semconv/how-to-write-conventions/ there are tasks to improve those docs. Also a good understanding can be gained by reviewing what is already defined.

The way I like to think during attribute naming is what is the item that is being described. That becomes the 2nd last namespace with the last being a property of the item you are capturing.

@zmoog zmoog force-pushed the zmoog/pkg/translator/azurelogs/activitylogs-complete branch from b2fb2a7 to 73b3ca0 Compare December 18, 2025 19:06
@zmoog zmoog force-pushed the zmoog/pkg/translator/azurelogs/activitylogs-complete branch 2 times, most recently from c21d57f to 82a32e7 Compare December 22, 2025 17:18
@zmoog
Copy link
Contributor Author

zmoog commented Dec 22, 2025

@constanca-m, @MikeGoldsmith, @atoulme, Could you take a look at this PR when you have a chance? 🙇

I also plan to port these log categories to extension/encoding/azureencodingextension when #44919 is merged.

@zmoog
Copy link
Contributor Author

zmoog commented Dec 22, 2025

I also plan to port these log categories to extension/encoding/azureencodingextension when #44919 is merged.

While we're on the subject of the new extension/encoding/azureencodingextension extension, I think we should complete the set of Activity Log categories in the current pkg/translator/azurelogs package first.

It would be a better user experience to have all eight categories supported instead of just the one. Let me know if you feel differently!

Copy link
Contributor

@constanca-m constanca-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mapping looks very good! Just 2 questions about it

Copy link
Contributor

@constanca-m constanca-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Maurizio, I took a final look and all seems good

@zmoog zmoog force-pushed the zmoog/pkg/translator/azurelogs/activitylogs-complete branch from 9f4c509 to 675cbfa Compare December 23, 2025 15:57
@zmoog zmoog force-pushed the zmoog/pkg/translator/azurelogs/activitylogs-complete branch from 675cbfa to f6d4332 Compare December 29, 2025 14:33
Copy link
Member

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, looks good to me.

@zmoog
Copy link
Contributor Author

zmoog commented Jan 7, 2026

@atoulme, let me know if you think this PR needs changes whenever you have a moment 🙇

Includes support for:

- Administrative
- Alert
- Autoscale
- Policy
- Resource Health
- Security
- Service Health

# Conflicts:
#	pkg/translator/azurelogs/resourcelogs_to_logs.go
#	pkg/translator/azurelogs/testdata/recommendation/valid_1_expected.yaml
zmoog and others added 10 commits January 7, 2026 14:59
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: James Thompson <thompson.tomo@outlook.com>
Co-authored-by: Constança Manteigas <113898685+constanca-m@users.noreply.github.com>
azure.identity.identifier.name > user.name
@zmoog
Copy link
Contributor Author

zmoog commented Jan 19, 2026

Hey @atoulme, sorry to bother you again, but I believe the PR is good to go for a final look whenever you have a moment! 🙇

@ChrsMark
Copy link
Member

I'm going to remove the ready to merge label since we still need an approval from the PR's facilitator (or another approver): https://github.com/open-telemetry/opentelemetry-collector-contrib?tab=readme-ov-file#prs-and-reviews

@ChrsMark ChrsMark removed the ready to merge Code review completed; ready to merge by maintainers label Jan 19, 2026
@zmoog
Copy link
Contributor Author

zmoog commented Jan 19, 2026

I'm going to remove the ready to merge label since we still need an approval from the PR's facilitator (or another approver): https://github.com/open-telemetry/opentelemetry-collector-contrib?tab=readme-ov-file#prs-and-reviews

Thanks for the clarification, @ChrsMark.

I don't really know what to do next to wrap up this PR, it has been open for more than a month.

I would love to complete the review of these changes before porting them to the new extension/azure_encoding.

@ChrsMark
Copy link
Member

ChrsMark commented Jan 19, 2026

I'm going to remove the ready to merge label since we still need an approval from the PR's facilitator (or another approver): https://github.com/open-telemetry/opentelemetry-collector-contrib?tab=readme-ov-file#prs-and-reviews

Thanks for the clarification, @ChrsMark.

I don't really know what to do next to wrap up this PR, it has been open for more than a month.

I would love to complete the review of these changes before porting them to the new extension/azure_encoding.

What needs to happen here is to get an approval from the PR's facilitator (or another approver). You correctly pinged the PR's assigned approver at #44871 (comment) so let's give some time to Antoine to get to this. In case there is still delay feel free to raise this in CNCF slack (#otel-collector-dev channel).

FYI, I filed a PR to update the docs accordingly regarding the use of ready to merge label: #45474

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better than before. Merging.

@atoulme atoulme merged commit fceb57b into open-telemetry:main Jan 21, 2026
229 checks passed
@otelbot
Copy link
Contributor

otelbot bot commented Jan 21, 2026

Thank you for your contribution @zmoog! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help.

@zmoog zmoog deleted the zmoog/pkg/translator/azurelogs/activitylogs-complete branch January 22, 2026 08:17
atoulme pushed a commit that referenced this pull request Feb 27, 2026
…oscale, Policy, Security, ServiceHealth, and ResourceHealth log categories. (#45699)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR brings over the remaining Activity log categories from
`translator/azurelogs`, aligning this component with the changes made in
#44871.

New log categories:

- Administrative
- Alert
- Autoscale
- Policy
- Security
- ServiceHealth
- ResourceHealth

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. 
#### Link to tracking issue
Fixes n/a
-->

<!--Describe what testing was performed and which tests were added.-->
#### Testing

We added test cases for each category, leveraging the same log events
found in translator/azurelogs for consistency.

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

Added a section covering Identity (including its major subfields) along
with dedicated sections for each new log category.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants