-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Conversation
6f1f6d9
to
8b4a8fb
Compare
8b4a8fb
to
bd312ec
Compare
Any update here? |
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) |
There was a problem hiding this comment.
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.
I minor comment about error handling, otherwise LGTM. |
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; |
There was a problem hiding this comment.
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.
8027920
to
e611b88
Compare
Signed-off-by: Samuel Karp <skarp@amazon.com>
Signed-off-by: Samuel Karp <skarp@amazon.com>
Signed-off-by: Samuel Karp <skarp@amazon.com>
e611b88
to
8a6dfb2
Compare
@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.) |
@samuelkarp thanks! docs LGTM ping @moxiegirl |
Failures are unrelated, but I'll wait for @moxiegirl to give her 👍 before merging. |
LGTM! Thank you @samuelkarp |
[awslogs] Auto-detect region and set user-agent
Thanks! |
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.