-
Notifications
You must be signed in to change notification settings - Fork 69
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
feature: adding support for AWS X-RAY #1987
Conversation
* added quick-start golnag app in example * Added quick-start-python in examples
* chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io>
* docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd
* feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information
* refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com>
server/id/generator.go
Outdated
tid := trace.TraceID{} | ||
g.rand.Read(tid[:]) | ||
return tid | ||
var r [16]byte |
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.
@mathnogueira @schoren there is quite an annoying rule by x-ray that requires traces to include a prefix to calculate the creation time, if the trace is older than 30 days the API returns an error, if the prefix is missing x-ray returns an error, I have this code here knowing that is wrong to put it in this place, should we also support a different way of creating traces based on data store? I'm open to ideas
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.
Brainstorming: Maybe we should have specializations of this generator (or about the traceid logic) and do something similar with the connectivity PR?
@@ -0,0 +1,801 @@ | |||
package tracedb | |||
|
|||
import ( |
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.
Big chunky file that contains everything related to the x-ray connectivity and parsing of the data
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.
Makes sense to create a package for XRay inside of tracedb
and break this file by responsibilities/concerns?
properties: | ||
region: | ||
type: string | ||
accessKeyId: |
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.
To think of tech debt in the future: this is sensitive data that we should store in our database hashed.
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.
Will be addressed in a separate PR
server/id/generator.go
Outdated
tid := trace.TraceID{} | ||
g.rand.Read(tid[:]) | ||
return tid | ||
var r [16]byte |
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.
Brainstorming: Maybe we should have specializations of this generator (or about the traceid logic) and do something similar with the connectivity PR?
server/tracedb/awsxray.go
Outdated
|
||
spans = append(spans, nestedSpans...) | ||
|
||
// if seg.Cause != nil && |
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.
Can we remove this code?
server/tracedb/awsxray.go
Outdated
|
||
func convertToAmazonTraceID(traceID trace.TraceID) (string, error) { | ||
const ( | ||
// maxAge of 28 days. AWS has a 30 day limit, let's be conservative rather than |
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.
// maxAge of 28 days. AWS has a 30 day limit, let's be conservative rather than | |
// maxAge of 28 days in seconds. AWS has a 30-day limit, let's be conservative rather than |
@@ -0,0 +1,801 @@ | |||
package tracedb | |||
|
|||
import ( |
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.
Makes sense to create a package for XRay inside of tracedb
and break this file by responsibilities/concerns?
b7f9f9a
to
64d99a0
Compare
* feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
* feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
* feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * chore: disable application exporter in demo (#2012) disable app exporter in demo * feature(examples): adding aws terraform example * updating the tracetest image * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * feat: config deprecation (#2015) * update options to use named fields * add postgresConnString as deprecated * remove nil validations * fix deprecated config fields detection * add logger to config New function * replace zap with go's log package * invert logic of printing the deprecation note Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * unexport logger interface * use camelCase names in tests * update test with Sebastian notes and update logic to make it pass --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * fix: postgres config retrocompatibility (#2043) feat: ensure retrocompatibility if users is using postgresConnString * feature: adding support for AWS X-RAY (#1987) * feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com> * feature(examples) adding tracetest x aws-xray examples (#2030) * feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * feature(examples) adding tracetest x aws-xray examples * cleanup * cleanup * removing mysql dependency --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com> * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io>
* feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
* feature: adding support for AWS X-RAY * updating README * cleanup * feat(server): implement viper (#1977) * added quick-start golang app in example (#1940) * added quick-start golnag app in example * Added quick-start-python in examples * chore(docs): add recipe for datadog (#1995) * chore(examples): adding documentation and example of datadog integration * adding datadog recipe * fixing details in docs * Apply suggestions from code review Co-authored-by: Julianne Fermi <julianne@kubeshop.io> --------- Co-authored-by: Julianne Fermi <julianne@kubeshop.io> * Update docs structure and config guides (#1984) * docs(1919): flatten tools and integration * docs(1919): flatten examples and tutorials * docs(recipes): edit naming * docs(config): fix 1982 * examples(tempo): edit config * docs(structure): add redirect * docs(config): update dd * feature(examples): adding net core x tracetest example (#1978) * feature(examples): adding net core x tracetest example * adding readme * addressing feedback comments * adding more information * adding support for the native xray client * refactor connectivity test to reuse components (#1994) * refactor connectivity test to reuse components * only run next step if previous step succeeded * simplify tester TestConnection Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * add protocol in IsReachable function * ignore unused ctx * remove boolean return from IsReachable * use multierrors to wrap all endpoint errors * fix build * use const for IsReachable timeout * rename IsReachable to CheckReachability --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> * cleanup * using the new test connection logic * config(server): allow provisioning from file or environent variable (#1999) * cleanup * adding support for session token * feat(server): implement viper (#1977) * config(server): allow provisioning from file or environent variable (#1999) * moving trace id generation to data store * fixing unit tests * chore: disable application exporter in demo (#2012) disable app exporter in demo * removing examples * cleanup --------- Co-authored-by: Sebastian Choren <schoren@users.noreply.github.com> Co-authored-by: Mahesh Kasbe <60398112+maheshkasabe@users.noreply.github.com> Co-authored-by: Daniel Baptista Dias <danielbdias@users.noreply.github.com> Co-authored-by: Julianne Fermi <julianne@kubeshop.io> Co-authored-by: Adnan Rahić <adnan@kubeshop.io> Co-authored-by: Matheus Nogueira <matheus.nogueira2008@gmail.com>
This PR enables Amazon X-Ray as a data store for Tracetest.
Changes
Fixes
Checklist
Using AWS XRAY SDK to instrument plus the ADOT COllector
https://www.loom.com/share/5441578aef2442c78684916834335428
Using AWX XRAY SDK to instrument plus AWS XRAY SDK to pull Traces
https://www.loom.com/share/4ca15c89ba48455b813d6c605c828063
Using OpenTelemetry (Pokeshop) to instrument plus XRAY ADOT collector exporter plus AWS XRAY SDK to pull Traces
https://www.loom.com/share/3a4f3ad4955a4390ae475c18cad30f99