Skip to content

Req: Would like to be able to set source in addition to sourceCategory #15

@omnipitous

Description

@omnipitous

Description

The extension allows for override of the Collector's _sourceCategory via environment variable. The ability to set the _sourceName is also desirable for the same reason.. BUT when I looked into adding the feature that value (specifically the "X-Sumo-Name" header) is already being populated by the following method on line 175 of sumoclient.go:

func (s *sumoLogicClient) getLogStream() string {
currentTime := time.Now().UTC()
currentDate := fmt.Sprintf("%d/%02d/%02d", currentTime.Year(), currentTime.Month(), currentTime.Day())
return fmt.Sprintf("%s/[%s]%s", currentDate, s.config.FunctionVersion, config.ExtensionName)
}

It's hard to tell from the comment above it whether that's a required string some requirement from AWS or whether that comment was unrelated? Either way not being able to override that metadata makes migrating to this pattern problematic for many of our existing services..

Steps to Reproduce

NA

Expected Behavior

Some added "SOURCE_NAME_OVERRIDE" env var would allow for setting our own _sourceName in the same manner as "SOURCE_CATEGORY_OVERRIDE" does now.

Relevant Logs / Console output

NA

Your Environment

Self-Built Containerized Lambda running Python 3.8 at the moment but will shortly being doing the same for various other platforms specifically a LOT of Java-based Lambdas and some Go.

Additional context

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions