[exporter/azureblob] Add an option to azureblob exporter to use UTC in blob names
Description
Add a parameter use_utc to the azureblob exporter to use UTC, instead of local time, in blob names.
Defaults to false - no change to default behavior when undefined.
Link to tracking issue
Fixes #43752
Testing
Included a new test function TestGenerateBlobNameUseUTC in azureblob/exporter_test.go
Documentation
Added the parameter specification to the exporter's README:
- use_utc (default `false`): Use UTC time in blob name format.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: ChrsMark / name: Christos Markou (32d308ebe023f61f1e67c87cbdec98db8c7a6084)
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.
Important reminders:
- Please review our Contributing Guidelines.
- Don't forget to sign the Contributor License Agreement (CLA) if you haven't already.
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Hey @MovieStoreGuy & @hgaol - could you take a look at this. It's a pretty small change. (commenting to clear stalebot)
Hi @cruscio , instead of only supportingUTC time, I think timezone or offset is more flexible.
@hgaol - that works for me. I was trying to keep it simple at the start. Happy to expand on the concept to make it more flexible.
Hey @MovieStoreGuy looks like this is waiting for your review too. Any chance you coul take a quick look and let me know if I'm missing anything? Thanks!
This PR was marked stale due to lack of activity. It will be closed in 14 days.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Hey @MovieStoreGuy @hgaol - I'm a first time contributor. Is there anything here I'm missing or didn't do right?
Hi @cruscio , as component owner, I mainly focus on reviewing PR. You can ping approvers or maintainers to review/merge your PR. BTW, all checks should be passed before merging the PR.
CI is failing (https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/20135422961/job/57791571954?pr=43753#step:9:87):
=== FAIL: . TestGenerateBlobNameTimezoneSpecificLocation (re-run 1) (0.00s)
exporter_test.go:199:
Error Trace: /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/exporter/azureblobexporter/exporter_test.go:199
Error: Received unexpected error:
parsing time "2006/01/02/metrics_15_04" as "2006/01/02/metrics_15_04_05.json": cannot parse "" as "_"
Test: TestGenerateBlobNameTimezoneSpecificLocation
@cruscio we will need this to be fixed
Apologies. I will get that taken care of