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

[awslogs] Auto-detect region and set user-agent #16640

Merged
merged 3 commits into from Oct 30, 2015

Conversation

samuelkarp
Copy link
Member

This pull request enhances the awslogs logging driver such that it can automatically detect the correct Amazon CloudWatch Logs region when the Docker daemon is running on an Amazon EC2 instance.

@samuelkarp
Copy link
Member Author

Any update here?

@thaJeztah
Copy link
Member

Hi @samuelkarp apologies for the delay, it's been busy times, so reviews are taking a bit longer than we want.

ping @calavera I saw you reviewed the original PR, perhaps you can have a look at this?

if err != nil {
logrus.WithFields(logrus.Fields{
"error": err,
}).Error("Could not get region from EC2 metadata, environment, or log option", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

did you mean to use Errorf here? It's going to print an unusual message if we leave it like this.

@calavera
Copy link
Contributor

I minor comment about error handling, otherwise LGTM.

@tiborvass
Copy link
Contributor

LGTM

You must specify a region for the `awslogs` logging driver. You can specify the
region with either the `awslogs-region` log option or `AWS_REGION` environment
variable:
The `awslogs` logging driver must send your Docker logs to a specified region;
Copy link
Contributor

Choose a reason for hiding this comment

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

The phrasing is a bit odd. Maybe;

The awslogs logging driver sends your Docker logs to a specific region. Use the awslogs-region log option or the AWS_REGION environment variable to
set the region value. By default, if your Docker daemon is running on an EC2 instance and no region is set, the driver uses the instance's region.

@samuelkarp samuelkarp force-pushed the awslogs-logging-driver branch 2 times, most recently from 8027920 to e611b88 Compare October 27, 2015 23:39
Signed-off-by: Samuel Karp <skarp@amazon.com>
Signed-off-by: Samuel Karp <skarp@amazon.com>
Signed-off-by: Samuel Karp <skarp@amazon.com>
@samuelkarp
Copy link
Member Author

@calavera and @moxiegirl, thanks for the review! I've rebased on master and addressed both your comments. (I'm seeing some failures in Jenkins, but I believe those to be unrelated to my code.)

@thaJeztah
Copy link
Member

@samuelkarp thanks! docs LGTM

ping @moxiegirl

@calavera
Copy link
Contributor

Failures are unrelated, but I'll wait for @moxiegirl to give her 👍 before merging.

@moxiegirl
Copy link
Contributor

LGTM! Thank you @samuelkarp

tiborvass added a commit that referenced this pull request Oct 30, 2015
[awslogs] Auto-detect region and set user-agent
@tiborvass tiborvass merged commit c545dce into moby:master Oct 30, 2015
@samuelkarp
Copy link
Member Author

Thanks!

@thaJeztah thaJeztah added this to the 1.10.0 milestone Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants