axiomhq / axiom-go Goto Github PK
View Code? Open in Web Editor NEWOfficial Go bindings for the Axiom API
Home Page: https://axiom.co
License: MIT License
Official Go bindings for the Axiom API
Home Page: https://axiom.co
License: MIT License
I recently upgraded all my go packages one of those updates were alot of go.opentelemetry.io/otel/ modules
my go mod file
go_mod.txt
currently using github.com/axiomhq/axiom-go v0.18.0
And I am getting conflicting Schema URL: https://opentelemetry.io/schemas/1.25.0 and https://opentelemetry.io/schemas/1.24.0
which is most likely caused by
Line 17 in 06adf55
After downgrading some of the otel modules to 1.24.0 instead of 1.27.0 it works again
README is missing an example of passing events with custom timestamps!
me stupid, already figured out but...
when README.md mention about AXIOM_ORG_ID
it should mention it's the simple string under your organisation's name in setting's page, otherwise I have been hunting for a long uuid with title Organisation Id
on settings' page and found nothing.
when you provide me a click to copy button it doesn't indicate anything that is an org id, I only found out after I
axiom --help
and in the FLAGS
it told me what's my org idaxiom org id
and found this blog, this should be under any sdk uses or mention org_id
little thing, could save people minutes
http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error
Solved by setting request.GetBody()
, axiom-go would need to provide an additional ingest api, something like
client.IngestStream(ctx, "my-dataset", func() (io.ReadCloser, error) {
return os.Open("/some/file")
})
so that the go http client can retry correctly
Axiom 1.19 supports APL time ranges on query endpoints and the filters for shared access signatures. This should be addressed in this package as well.
This might be a good option to give Go Generics (coming in Go 1.18 Mid February 2022) a shoot. Instead of having interface{}
/any
, we could define a custom constraint for time.Time | APL
where APL
is basically a string
based type with some sugar on it.
What the server returns as "op" isn't named correctly, should be an alias.
axiom-go/axiom/query/result.go
Line 216 in fd368e7
Change to: Alias string json:"op"
Support the /integrations
endpoint of the Axiom API.
Axiom go client Options doesn't include an Option to disable retries which is enabled by default.
It would be nice if you could opt out of the automatic retry feature
Is it possible to add ability to ingest to OTEL endpoint using proto format?
This is what I am currently using for one of my services to send logs:
req := plogotlp.NewExportRequestFromLogs(logs)
data, err := req.MarshalProto()
if err != nil {
log.Println(err)
return err
}
httpReq, err := http.NewRequest("POST", axiomUrl+"/v1/logs", bytes.NewBuffer(data))
if err != nil {
log.Println(err)
return err
}
httpReq.Header.Set("X-Axiom-Dataset", axiomDatasetName)
httpReq.Header.Set("X-Axiom-OrgId", axiomOrgId)
httpReq.Header.Set("Authorization", "Bearer "+ axiomToken)
httpReq.Header.Set("Content-Type", "application/x-protobuf")
_, err = http.DefaultClient.Do(httpReq)
if err != nil {
log.Println(err)
return err
}
Developers by default want to create Event objects and ingest them and not create Streams. Please make this a bit more friendly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.