You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[exporter/azureblob] Fix Azure Blob Storage name to avoid breaking file extension (#39606)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Add Fix Azure Blob Storage name to avoid breaking file extension.
Previously the final blob names looked like the following:
```
2025/04/24/traces_00_59_20.json_6651
```
^(this is the actual result I took from one of the raw logs generated
from running the unit test)
Now they properly append the random number before the file extension:
```
2025/04/24/traces_00_59_49_4913.json
```
EDIT: This logic has now been made configurable instead of the default.
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#39593
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Added a new test `TestGenerateBlobNameSerialNumBefore`
<!--Describe the documentation added.-->
#### Documentation
Updated the `README.md` with the new config option
<!--Please delete paragraphs that you did not use before submitting.-->
Copy file name to clipboardExpand all lines: exporter/azureblobexporter/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ The following settings can be optionally configured and have default values:
36
36
- logs_format (default `2006/01/02/logs_15_04_05.json`): blob name format.
37
37
- traces_format (default `2006/01/02/traces_15_04_05.json`): blob name format.
38
38
- serial_num_range (default `10000`): a range of random number to be appended after blob_name. e.g. `blob_name_{serial_num}`.
39
+
- serial_num_before_extension (default `false`): places the serial number before the file extension if there is one. e.g `blob_name_{serial_num}.json` instead of `blob_name.json_{serial_num}`
39
40
- format (default `json`): `json` or `proto`. which present otel json or otel protobuf format, the file extension will be `json` or `pb`.
40
41
- encodings (default using encoding specified in `format`, which is `json`): if specified, uses the encoding extension to encode telemetry data. Overrides format.
0 commit comments