aws

package
v0.0.0-...-91eccfc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RegionField is the name of the field containing the AWS region.
	RegionField = "ec2_region"
	// InstanceField is the name of the field containing the EC2 instance ID.
	InstanceField = "ec2_instance"
	// TaskARNField is the name of the field containing the ECS task ARN.
	TaskARNField = "ecs_task_arn"
	// TaskFamilyField is the name of the field containing the ECS task family.
	TaskFamilyField = "ecs_task_family"
	// TaskVersionField is the name of the field containing the ECS task version.
	TaskVersionField = "ecs_task_version"
)

Variables

Session is used by EC2Info to retrieve details from AWS.

Functions

func EC2Info

func EC2Info(logger hatchet.Logger) hatchet.Logger

EC2Info adds application information to a log in a similar manner to logutil.AppInfo. It retrieves the hostname from EC2 rather than os.Hostname(). It will also attempt to retrieve the ECS service and task names if it has permission.

The following fields are added to the log if available: - ec2_region: The region in which the instance is running. - ec2_instance: The ID of the instance. - ecs_task: The ECS task ARN. - ecs_taskdef: The ECS task definition.

The ECS info requires that the ecs-agent's HTTP server be accessible. Regular app info is appended if the EC2 metadata endpoint is unavailable.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL