Skip to content

Commit 76f2844

Browse files
committed
otlp: config HTTP client with OTLP_ env vars
Closes #54 Signed-off-by: inge4pres <[email protected]>
1 parent eddbe5a commit 76f2844

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/otlp.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,12 @@ const HTTPClient = struct {
365365
config: *ConfigOptions,
366366
// Default HTTP Client
367367
client: http.Client,
368-
// Retries are processed using a separate thread.
369-
// A priority queue is maintained in the ExpBackoffRetry struct.
370-
// retry: *ExpBackoffRetry,
371368

372369
pub fn init(allocator: std.mem.Allocator, config: *ConfigOptions) !*Self {
370+
var env = try std.process.getEnvMap(allocator);
371+
defer env.deinit();
372+
// Merge the environment variables into the config.
373+
try config.mergeFromEnvMap(&env);
373374
try config.validate();
374375

375376
const s = try allocator.create(Self);

0 commit comments

Comments
 (0)