Skip to content

[AzureMonitorDistro] update vendored code#42479

Merged
TimothyMothra merged 8 commits intomainfrom
tilee/aspnetcore_updateVendored
Mar 7, 2024
Merged

[AzureMonitorDistro] update vendored code#42479
TimothyMothra merged 8 commits intomainfrom
tilee/aspnetcore_updateVendored

Conversation

@TimothyMothra
Copy link

No description provided.

@rajkumar-rangaraj
Copy link
Member

We planned to keep all the files from shared folder to reduce maintainability issue. But, I see files from that folder is getting removed. Is there an issue with keeping those files?

@TimothyMothra
Copy link
Author

We planned to keep all the files from shared folder to reduce maintainability issue. But, I see files from that folder is getting removed. Is there an issue with keeping those files?

Either we should 1) keep everything or 2) keep only what's needed. Currently we aren't doing either.

I strongly feel we should go with Option 2.
Fewer files will have lower maintenance when needing to update. Also, the shared files in otel-dotnet are different from those in otel-dotnet-contrib and it's already challenging to keep these merged.

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

### Bugs Fixed

* Will no longer emit `db.statement_type` as a part of SQL custom dimensions.
This attribute was removed from the SqlClient Instrumentation Library because it's not a part of the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/v1.24.0/docs/database/database-spans.md#call-level-attributes).
Copy link
Member

Choose a reason for hiding this comment

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

Do you want to add PR link at the end?

Copy link
Author

@TimothyMothra TimothyMothra Mar 7, 2024

Choose a reason for hiding this comment

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

I'm not clear on how we want to handle this for vendored code. We increase our maintenance load if we want list every major change.

I think a reasonable user could navigate to the otel repo to review changes there.
We can always adapt our strategy here based on feedback.

Copy link
Author

Choose a reason for hiding this comment

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

I'm merging now so I can continue working on following changes.
We can review this again before releasing.

@TimothyMothra TimothyMothra enabled auto-merge (squash) March 7, 2024 00:33
@TimothyMothra TimothyMothra merged commit c42894e into main Mar 7, 2024
@TimothyMothra TimothyMothra deleted the tilee/aspnetcore_updateVendored branch March 7, 2024 00:33
@@ -1,18 +1,7 @@
// <copyright file="SqlActivitySourceHelper.cs" company="OpenTelemetry Authors">
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

We got advice from CELA last year about how to copy code from an open source repo.
I can't find the email thread right now, but I'll try to find and share.

This line was added to all the vendored files in our original PR. #38848
In THIS PR, I'm trying to bring these other files in line with that original PR.

Copy link
Member

Choose a reason for hiding this comment

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

I don't understand.

Copy link
Author

Choose a reason for hiding this comment

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

CORRECTION
This line was originally included in the files from the OTel repo.
Reiley removed them in the source files a few months ago. open-telemetry/opentelemetry-dotnet#5140
We should do the same here. I'll create another PR to get this cleaned up.

Copy link
Member

Choose a reason for hiding this comment

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

Now coming to my next question - how do we pull 3rd party code and how do we review these PRs? (it's hard to tell whether the files are the same or there are accidental mistakes during copy/paste).

Copy link
Member

Choose a reason for hiding this comment

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

Our approach should be to copy the entire file, not to compare the text and merge them. I spoke to @TimothyMothra, stating that we need to copy the files instead of comparing the text before the review. I also missed this during the review.

We don’t have a formalized process for review. We will work with the Azure SDK team on the process. Until we find a process, we may need to have a very strict manual review process. (Along with it, we should at least have minimum of 2 approval needed to merge).

Copy link
Member

Choose a reason for hiding this comment

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

Our approach should be to copy the entire file, not to compare the text and merge them. I spoke to @TimothyMothra, stating that we need to copy the files instead of comparing the text before the review. I also missed this during the review.

We don’t have a formalized process for review. We will work with the Azure SDK team on the process. Until we find a process, we may need to have a very strict manual review process. (Along with it, we should at least have minimum of 2 approval needed to merge).

Thanks!

angiurgiu pushed a commit that referenced this pull request Mar 20, 2024
* update SqlClient

* update ResourceDetector

* changelog

* delete unused Vendored\Shared code

* update copyright

* update shared code

* changelog

* update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Distro Monitor OpenTelemetry Distro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants