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

TMDEv4 changes for service lens #2623

Merged
merged 3 commits into from
Sep 22, 2020
Merged

TMDEv4 changes for service lens #2623

merged 3 commits into from
Sep 22, 2020

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Sep 9, 2020

Summary

Merge feature branch of TMDEv4 changes for service lens

This is a combination of two PRs: #2586 and #2620

This change adds metadata to the Task metadata endpoint v4

Below is a diff of the added information when querying the /task endpoint (${ECS_CONTAINER_METADATA_URI_V4}/task). There will be a follow-up PR to add ContainerArn, which will need to be provided by the ECS backend.

{
  "Cluster": "usw2",
  "TaskARN": "arn:aws:ecs:us-west-2:NNNN:task/NNNN/NNNN",
  "Family": "NNNN",
  "Revision": "4",
  "DesiredStatus": "RUNNING",
  "KnownStatus": "RUNNING",
  "Limits": {
    "CPU": 0.25,
    "Memory": 256
  },
  "PullStartedAt": "2020-08-21T18:18:05.845370929Z",
  "PullStoppedAt": "2020-08-21T18:18:06.561130985Z",
  "AvailabilityZone": "us-west-2a",
+ "LaunchType": "EC2",
  "Containers": [
    {
      "DockerId": "NNNN",
      "Name": "main",
      "DockerName": "ecs-NNNN-NNNN",
      "Image": "NNNN.dkr.ecr.us-west-2.amazonaws.com/NNNN:NNNN",
      "ImageID": "sha256:NNNN",
      "Labels": {
        "com.amazonaws.ecs.cluster": "NNNN",
        "com.amazonaws.ecs.container-name": "main",
        "com.amazonaws.ecs.task-arn": "arn:aws:ecs:us-west-2:NNNN:task/NNNN/NNNN",
        "com.amazonaws.ecs.task-definition-family": "NNNN",
        "com.amazonaws.ecs.task-definition-version": "4"
      },
      "DesiredStatus": "RUNNING",
      "KnownStatus": "RUNNING",
      "Limits": {
        "CPU": 256,
        "Memory": 0
      },
      "CreatedAt": "2020-08-21T18:18:06.576462775Z",
      "StartedAt": "2020-08-21T18:18:07.397380758Z",
      "Type": "NORMAL",
+     "ContainerARN": "arn:aws:ecs:us-west-2:NNNN:task/NNNN/NNNN",
+     "LogDriver": "awslogs",
+     "LogOptions": {
+       "awslogs-group": "NNNN-cluster",
+       "awslogs-region": "us-west-2",
+       "awslogs-stream": "auto-ecs/main/NNNN"
+     },
      "Networks": [
        {
          "NetworkMode": "host",
          "IPv4Addresses": [
            ""
          ]
        }
      ]
    }
  ]
}

Description for the changelog

ECS metadata for AWS service lens and x-ray

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sparrc sparrc changed the title [wip] Feature/tmdev4 service lens TMDEv4 changes for service lens Sep 22, 2020
@sparrc sparrc added this to the 1.45.0 milestone Sep 22, 2020
Copy link
Member

@fierlion fierlion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@sparrc sparrc merged commit abe5e5c into dev Sep 22, 2020
@cyastella cyastella deleted the feature/tmdev4-service-lens branch October 22, 2020 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants