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

Support metrics collection in DD #431

Closed
3 tasks
timmc-edx opened this issue Jul 15, 2024 · 6 comments
Closed
3 tasks

Support metrics collection in DD #431

timmc-edx opened this issue Jul 15, 2024 · 6 comments

Comments

@timmc-edx
Copy link
Contributor

timmc-edx commented Jul 15, 2024

Acceptance criteria:

  • edx-django-utils supports a new add_metric (or similar) monitoring function, complementing span tag/custom attribute collection
  • The new function is implemented at least for Datadog, but is general enough that it could be implemented for New Relic and OpenTelemetry as well.
  • 2U: Communicate to Sonic team when this is released (https://2u-internal.atlassian.net/browse/SONIC-409)

Implementation notes:

  • For Datadog, we'd want to pull in the datadog Python package and install the DogStatsD agent.
  • Compatibility and abstraction:
    • OpenTelemetry requires that you first construct a named Meter (of a particular type: gauge, counter, etc.) and then make calls to it. edx-django-utils could transparently create and cache these.
    • New Relic has yet another approach, with push-based metrics via record_custom_metric and pull-based via register_data_source -- and each value can be a number or a dictionary of statistical aggregations (count/total/min/max) that don't match the other systems' metric breakdowns. It also has a naming scheme that may conflict with other implementations. It might be that NR users should just use the OTel integration. See comparison of support.
@timmc-edx timmc-edx self-assigned this Jul 15, 2024
@timmc-edx
Copy link
Contributor Author

Requesting clarification from Datadog about whether set_metric is even what we would want to call: https://help.datadoghq.com/hc/en-us/requests/1773961 (2U private link)

@timmc-edx
Copy link
Contributor Author

Got an answer:

  • set_metric in ddtrace is for span tags (with numeric values), not actual metrics.
  • We would need to add dogstatsd or similar. For that, I think we'd want to switch to extras requirements.

@timmc-edx
Copy link
Contributor Author

We may hold off on this and have Purchase try out dogstatsd in a private plugin if it turns out they need it, and then consider building out an abstraction layer in edx-django-utils based on what we learn from that.

@robrap
Copy link
Contributor

robrap commented Jul 17, 2024

Thanks. I would guess that SRE has experience deploying dogstatsd, which could be confirmed. I think Purchase should be pointed to SRE for support around the setup.

@robrap robrap changed the title Support metrics collection Support metrics collectionin DD Aug 7, 2024
@robrap
Copy link
Contributor

robrap commented Aug 7, 2024

https://2u-internal.atlassian.net/browse/SONIC-409 is being used to PoC this functionality, rather than jumping to adding anything to the edx-django-utils API.

@robrap robrap changed the title Support metrics collectionin DD Support metrics collection in DD Aug 7, 2024
@robrap
Copy link
Contributor

robrap commented Aug 21, 2024

I'm going to close this ticket as unplanned, and we'll revisit when and if it is needed in the future.

@robrap robrap closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
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

No branches or pull requests

2 participants