Skip to content

Onboard EventHubs onto structured logging#26561

Merged
lmolkova merged 6 commits intoAzure:mainfrom
lmolkova:eventhubs-structured-logging
Jan 31, 2022
Merged

Onboard EventHubs onto structured logging#26561
lmolkova merged 6 commits intoAzure:mainfrom
lmolkova:eventhubs-structured-logging

Conversation

@lmolkova
Copy link

@lmolkova lmolkova commented Jan 18, 2022

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run java - [service] - ci

@ramya-rao-a
Copy link
Contributor

Hey @lmolkova!

I am interested in understanding more about how we are doing structured logging. Could you perhaps consider updating the PR description with some context?

Copy link
Member

@conniey conniey left a comment

Choose a reason for hiding this comment

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

LGTM!

@lmolkova
Copy link
Author

I am interested in understanding more about how we are doing structured logging. Could you perhaps consider updating the PR description with some context?

@ramya-rao-a sure, I updated the description.

TL;DR:

We write a portion of the log message that SDK controls as json. Logging APIs now allow adding key-value-pairs. As a result, we're switching from

2021-10-01 06:32:42,732 INFO [com.azure.core.amqp.implementation.handler.ReceiveLinkHandler] (reactor-executor-183) connectionId[MF_c991bc_1632981438863] linkName[session-_368299_1633069903838] entityPath[pms-restrictions] Receiver link was never active. Closing endpoint states.

to

2021-10-01 06:32:42,732 INFO [com.azure.core.amqp.implementation.handler.ReceiveLinkHandler] (reactor-executor-183) {"az.sdk.message": "Receiver link was never active. Closing endpoint states", "connectionId":"MF_c991bc_1632981438863", "linkName":"session-_368299_1633069903838", "entityPath":"pms-restrictions"}

These logs (when shared as files) can be easily parsed with some tooling, sent to Log Analytics and queried.
They could also be analyzed by customers: e.g. Azure Monitor allows to parse json at query time. Splunk and some other logging tools also allow parsing json at query time.

I.e. we can semi-automate log analysis, or give queries to support engineers and customers to troubleshoot common issues.

@lmolkova lmolkova force-pushed the eventhubs-structured-logging branch from 35b932b to dad1489 Compare January 27, 2022 05:22
@lmolkova lmolkova merged commit 4a1c009 into Azure:main Jan 31, 2022
azure-sdk pushed a commit to azure-sdk/azure-sdk-for-java that referenced this pull request Nov 7, 2023
[Hub Generated] Publish private branch 'datafactory/zheyuanzhang/lakehouse_swagger' (Azure#26561)

* [AutoSync] 5a9813b211 Add lakehouse swagger

* [AutoSync] 1cc7912bdd Fix spelling

* [AutoSync] bc53c0c6db Add type

* Add swagger change for Synapse

* Fix Synapse

* Fix reference

---------

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants