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

Bug fixing: TelemetryAPI receiver #1346

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions collector/internal/telemetryapi/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ import (
)

const (
ApiVersion20220701 = "2022-07-01"
ApiVersionLatest = ApiVersion20220701
SchemaVersion20220701 = "2022-07-01"
SchemaVersionLatest = SchemaVersion20220701
SchemaVersion20221213 = "2022-12-13"
SchemaVersionLatest = SchemaVersion20221213
lambdaAgentIdentifierHeaderKey = "Lambda-Extension-Identifier"
)

Expand All @@ -42,7 +45,7 @@ func NewClient(logger *zap.Logger) *Client {
return &Client{
logger: logger.Named("telemetryAPI.Client"),
httpClient: &http.Client{},
baseURL: fmt.Sprintf("http://%s/%s/telemetry", os.Getenv("AWS_LAMBDA_RUNTIME_API"), SchemaVersionLatest),
baseURL: fmt.Sprintf("http://%s/%s/telemetry", os.Getenv("AWS_LAMBDA_RUNTIME_API"), ApiVersionLatest),
}
}

Expand Down
6 changes: 3 additions & 3 deletions collector/receiver/telemetryapireceiver/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package telemetryapireceiver // import "github.com/open-telemetry/opentelemetry-lambda/collector/receiver/telemetryapireceiver"

type event struct {
Time string `json:"time"`
Type string `json:"type"`
Record map[string]any `json:"record"`
Time string `json:"time"`
Type string `json:"type"`
Record any `json:"record"`
}
Loading