Draft
Conversation
Contributor
|
I just noticed that the aws sdk has two useful looking sub packages that might be able to replace the attribute/query building code in this client. |
benguillet
reviewed
May 18, 2018
| return gio.Item == nil | ||
| } | ||
|
|
||
| func isValidConsumedCapacityLevel(level string) bool { |
benguillet
reviewed
May 18, 2018
| Endpoint: aws.String(params.LocalDynamoURL), | ||
| } | ||
| svc := dynamodb.New(session.New(), &config) | ||
| //svc.Handlers.Retry.PushFrontNamed(CheckThrottleHandler) |
benguillet
approved these changes
May 18, 2018
ejholmes
reviewed
Jun 23, 2018
dynamodb_client/base_table_client.go
Outdated
| } | ||
|
|
||
| req, _ := dt.client.PutItemRequest(input) | ||
| err := dt.sendWithTracing(ctx, req) |
Contributor
There was a problem hiding this comment.
If #109 is merged, then we can just remove all of this and use PutItemWithContext. To add tracing to the client, with the table name included in the spans:
s := contrib.WithTracing(session.New())
c := dynamodb.New(s)
c.Handlers.Send.PushBack(func(r *request.Request) {
span := opentracing.SpanFromContext(r.Context())
span.SetTag(dd_opentracing.SpanType, "db")
span.SetTag("aws.table_name", dt.tableName)
})
Contributor
|
I rebased this, and added two commits:
|
|
Changing to "WIP". If you would like this to be reviewed, please convert back from WIP and we'll take a look. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a pretty simple dynamodb client that supports apm tracing and takes an an input a map of table descriptions (to be used in testing and in production for table creation).