Giter Club home page Giter Club logo

Comments (5)

ejholmes avatar ejholmes commented on September 18, 2024

As an example for the first step of this of adding the task arn/uuid as a label, this is what I was thinking of: https://github.com/aws/amazon-ecs-agent/compare/master...remind101:task-label?expand=1.

from amazon-ecs-agent.

samuelkarp avatar samuelkarp commented on September 18, 2024

I think this looks like a great idea and would be very happy to see a pull request! Please note that any pull requests will be accepted under the Apache 2.0 license.

I think the following three labels would make sense to be automatically applied:

  • com.amazonaws.ecs.task-arn
  • com.amazonaws.ecs.task-definition-arn
  • com.amazonaws.ecs.container-name

With respect to your question about supporting labels within task definitions, can you expand a bit on your use case here? Is your primary use-case just logging metadata? Are you looking to make scheduling decisions or IAM policies based on these?

from amazon-ecs-agent.

ejholmes avatar ejholmes commented on September 18, 2024

With respect to your question about supporting labels within task definitions, can you expand a bit on your use case here?

Sure! For my use case, it would only serve as logging metadata (for consumption by logspout/heka). Specifically, I'd like to set some labels on the container when it's run com.<place>.app-name, com.<place>.process-type, then I would have the labels extracted and added as structured data in syslog messages generated by logspout and shuttled off to sumo/papertrail for aggregation. Having the labels added to the log messages will make it significantly easier to query logs.

For this particular use case, the labels couldn't be added within the Dockerfile via the LABEL directive because the image could be used within multiple ecs services with a different process-type and app-name labels.

I think this looks like a great idea and would be very happy to see a pull request!

On it :).

from amazon-ecs-agent.

samuelkarp avatar samuelkarp commented on September 18, 2024

Released with v1.2.0.

from amazon-ecs-agent.

ejholmes avatar ejholmes commented on September 18, 2024

🤘

from amazon-ecs-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.