Skip to content

Conversation

jeremytang-db
Copy link

@jeremytang-db jeremytang-db commented Jul 23, 2025

Created Telemetry models to fit Telemetry data in required format.
Uses ActivityListener to collect activities.

Still need to implement and check flag to enable and disable. Should be disabled by default.

@jeremytang-db jeremytang-db changed the title [WIP] Implement Telemetry Reporting for Databricks feat(csharp/src/Drivers/Databricks): Implement Telemetry Reporting for Databricks Jul 23, 2025
@@ -0,0 +1,73 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Copy link
Contributor

Choose a reason for hiding this comment

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

please add a readme file in this folder, on how is the file generated.

@jeremytang-db jeremytang-db marked this pull request as ready for review July 28, 2025 20:01
@github-actions github-actions bot added this to the ADBC Libraries 20 milestone Jul 28, 2025
@jeremytang-db
Copy link
Author

@birschick-bq Could you take a look at this PR? Especially with the logic in DatabricksActivityListener.cs.

Copy link
Contributor

@birschick-bq birschick-bq left a comment

Choose a reason for hiding this comment

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

Thanks.

This is a start. I'll spend some more time on Wednesday to review.

@birschick-bq
Copy link
Contributor

P.S. You should normally work on a feature branch and not main in your fork. This will make it easier to sync your main with the upstream repository. Let me know if you want a further explanation?

@jeremytang-db
Copy link
Author

Thanks for your review. Please take a look again when you get the chance.

P.S. You should normally work on a feature branch and not main in your fork. This will make it easier to sync your main with the upstream repository. Let me know if you want a further explanation?

I see, is there a need to replace this PR?

@birschick-bq
Copy link
Contributor

@jeremytang-db - I'm working on a change to allow the ActivitySource tags to be set. I'll also expose the ActivitySource.Name

Copy link
Contributor

@CurtHagenlocher CurtHagenlocher left a comment

Choose a reason for hiding this comment

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

Thanks for this large change! Can you please resolve the merge conflict (perhaps by rebasing)? And is there a specific reason for all the added types to be public? If not, could you please make them internal instead? They seem like the kind of implementation details that shouldn't be part of a public contract.

@jeremytang-db
Copy link
Author

@CurtHagenlocher @birschick-bq @jadewang-db
Thanks for all the feedback. I believe I have addressed everything. Could you take another quick look when you get the chance?

{
_httpClient = httpClient;
_accessToken = accessToken;
_telemetryUrl = !string.IsNullOrEmpty(hostUrl) ? accessToken != null ? $"https://{hostUrl}/telemetry" : $"https://{hostUrl}/telemetry-unauth" : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this should be included with the driver. We have OpenTelemetry implemented, and the way to get this is via the OTEL logger. This is basically forcing extra traffic (especially on the service side) that isn't needed.

Copy link
Author

Choose a reason for hiding this comment

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

Oh I was unaware of this. Can you point me to how to access the OTEL logger? Thank you!

Copy link
Contributor

@birschick-bq birschick-bq left a comment

Choose a reason for hiding this comment

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

Hi Jeremy. Thanks. Here are a few more comments.

@birschick-bq
Copy link
Contributor

@jeremytang-db - I see you updated the comments, but I don't see any new pushed commits. Do you any commits that aren't pushed yet? Is it on another branch?

@jeremytang-db
Copy link
Author

@birschick-bq Sorry, I pushed to the wrong branch. It should be updated now.

@CurtHagenlocher
Copy link
Contributor

The subject of client-side telemetry is often a contentious one. I think there should be an opt-out for it on the connection string.

Unrelated to that, there may have been a merge or rebase error as this doesn't currently appear to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants