profile
viewpoint

deadtrickster/beam-dashboards 232

BEAM :heart: Prometheus :heart: Grafana

deadtrickster/cl-emb 11

GitHub mirror for http://common-lisp.net/project/cl-emb/

deadtrickster/accept 8

Accept* headers for Erlang/Elixir

deadtrickster/cl-events 8

Events (Hooks) for Common Lisp

deadtrickster/amqp_rpc 5

RPC Client/Server for amqp Elixir library

deadtrickster/cl-dropbox 3

Dropbox Core SDK in Common Lisp

deadtrickster/awesome-elixir 2

A curated list of amazingly awesome Elixir and Erlang libraries, resources and shiny things. Updates:

deadtrickster/cl-haml 1

Haml for Common Lisp

deadtrickster/cl-link-field-parser 1

Naive parser for HTTP Link header field

deadtrickster/cl-plus-ssl 1

Common Lisp bindings to OpenSSL.

PR opened elli-lib/elli

Handling unexpected integer status codes

This PR acts as a fall-through for receiving an uncommon or non-standard HTTP status code in the Elli handler and converting it to a response code string to prevent the handler from crashing. Validates the response code received as being an integer within the range established by the response_code type.

Addresses https://github.com/elli-lib/elli/issues/95.

+1 -0

0 comment

1 changed file

pr created time in 10 hours

issue openedelli-lib/elli

Elli throws an exception when returning unexpected HTTP status codes

It appears that when attempting to generate an HTTP status code binary description, Elli is unable to handle any codes that are not included in the list of handled function heads in elli_http.erl or a binary.

When receiving and attempting to handle non-standard or uncommon HTTP status codes, the handler crashes.

Since elli.erl declares a response type to be any integer between 100..999 inclusive, it should have a valid fall-through behavior for handling integer status codes that are not expected by that prepared list of status/1 function heads here

created time in 10 hours

issue commentopen-telemetry/opentelemetry-erlang

Exporter crashes Elixir application when protocol is set to grpc

This diff fixes it https://github.com/dwebster17/opentelemetry-erlang/commit/225c6eac0fb31fa649e7fd984ba382719ffd6a05

Although I'm not sure that pattern is encouraged / something we'd actually want to do.

dwebster17

comment created time in 11 hours

issue openedopen-telemetry/opentelemetry-erlang

Exporter crashes Elixir application when protocol is set to grpc

Currently running opentelemetry in an Elixir 1.10.1 application. I'm noticing that when the protocol is set to grpc, opentelemetry_exporter:init/1 fails because the gproc_pool process hasn't been started when we hit these lines:

https://github.com/open-telemetry/opentelemetry-erlang/blob/ea02818322e37b52d26e00777a1cf07681f40cf9/apps/opentelemetry_exporter/src/opentelemetry_exporter.erl#L27

The grpcbox_channel module calls:

gproc_pool:new(Name, BalancerType, [{size, length(Endpoints)}, {autosize, true}]),

which yields this error:

=ERROR REPORT==== 25-Nov-2020::23:07:56.228545 ===
** State machine opentelemetry_exporter terminating
** When server state  = {undefined,undefined}
** Reason for termination = exit:{noproc,
                                  {gen_server,call,
                                   [gproc_pool,
                                    {new,opentelemetry_exporter,round_robin,
                                     [{size,1},{autosize,true}]}]}}
** Callback mode = undefined
** Stacktrace =
**  [{gen_server,call,2,[{file,"gen_server.erl"},{line,215}]},
     {gproc_pool,call,1,
                 [{file,"/drone/src/github.com/postmates/knapsack/commit/671d270d1ee59305d6a39d975b4818dc09f42d9e/deps/gproc/src/gproc_pool.erl"},
                  {line,632}]},
     {grpcbox_channel,init,1,
                      [{file,"/drone/src/github.com/postmates/knapsack/commit/671d270d1ee59305d6a39d975b4818dc09f42d9e/deps/grpcbox/src/grpcbox_channel.erl"},
                       {line,76}]},
     {gen_statem,init_it,6,[{file,"gen_statem.erl"},{line,714}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]

I'm honestly not sure if this issue is isolated to how Elixir does releases, or if this is universal (I'd guess the former). Considering the opentelemetry_exporter module doesn't implement the application behaviour, I'm wondering if mix skips it when it is trying to start up dependencies in order, and as a result, the grcpbox and gproc processes aren't correctly started by the time they're needed?

Any thoughts / help here would be greatly appreciated!

created time in 12 hours

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

I was trying to find in other implementations (like Java's) what they use but haven't found their defaults.. Maybe 50, I think thats what Fred's flatlog defaults to.

gugahoa

comment created time in 16 hours

issue commentopen-telemetry/opentelemetry-erlang

Make grpc optional dependency for exporter

Agreed, I'd wanted to do this and was hoping https://github.com/erlang/otp/pull/2675 would be merged a while ago. Hopefully it is merged for OTP 24.

chulkilee

comment created time in 16 hours

issue commentopentelemetry-beam/opentelemetry_zipkin

Add a token to the configuration examples.

Ah, I see, these docs are still OpenTracing based. It may work if you set the token in resources. You can set a resource with either an application env var or an OS var: https://github.com/open-telemetry/opentelemetry-erlang/blob/master/apps/opentelemetry/test/otel_resource_SUITE.erl#L19

CrowdHailer

comment created time in 16 hours

issue openedopen-telemetry/opentelemetry-erlang

Make grpc optional dependency for exporter

When an end user only want to export via OTLP/HTTP (either binary-encoded Protobuf or JSON Protobuf) - it will not use gRPC at all. In such cases, it would be better to avoid including the grpc dependency (grpcbox) if possible.

(low priority though)

created time in 21 hours

PR closed deadtrickster/prometheus.erl

persisting metrics using prometheus_sup:register_metrics/1

Currently, when an app declares metrics, they are stored in ets tables and if prometheus is restarted for any reason (which has happened in our case), all previously registered metrics will be lost and the calling application will crash since the metrics no longer exist on the side of prometheus. This forces users to define metrics in sys.config under entry of "default_metrics" so that they are preserved across app restarts, however this is sometimes inconvenient. This pull request fixes this problem by allowing users to register metrics via. code using the same format as used in sys.config which are preserved across app restarts.

+7 -0

0 comment

1 changed file

SoniCoder

pr closed time in a day

issue commentopentelemetry-beam/opentelemetry_zipkin

Add a token to the configuration examples.

More context, https://docs.lightstep.com/docs/use-zipkin-with-lightstep

So it looks like the access token, auth information should be added to the tracers default configuration.

From the docs here https://hexdocs.pm/opentelemetry_api/OpenTelemetry.Tracer.html#set_attributes/1 It sounds like setting attributes on a tracer just sets the attribute on the current (top?) span.

So these are the changes I have made to send data to lightstep https://github.com/did-app/glance/commit/1d21427444384b9a0ed1f7a0c45ef591821ea3a7

CrowdHailer

comment created time in a day

issue commentopentelemetry-beam/opentelemetry_zipkin

Add a token to the configuration examples.

There really isn't much more information, I can add a screenshot. I suppose the simplest thing.

I was looking at this digram and assuming I could just use the zipkin exporter to send data straight to the vendor ingest point, Which is what I was trying to set up with light step. That's because I couldn't work out where to run a collector in a heroku environment.

Is running without a collector a naive thing to be doing

CrowdHailer

comment created time in a day

issue commentopentelemetry-beam/opentelemetry_zipkin

Add a token to the configuration examples.

I've not used lightstep. They likely have an example using the collector so might be easier to send to the collector and then to lightstep.

What does it say after Zipkin initialization:? I can't tell how it is adding it from that snippet.

CrowdHailer

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

What char limit would be reasonable?

gugahoa

comment created time in a day

push eventopen-telemetry/opentelemetry-erlang

Tristan Sloughter

commit sha ecaf56597f742498db4b2acdd66015afcacf7ba7

remove reference to opentelemetry-erlang-api in the README

view details

Tristan Sloughter

commit sha 366daa8c82534eff6980cf1e65f4c51420581ca1

Merge branch 'master' into api-repo-readme

view details

Tristan Sloughter

commit sha 2411809b3c53508465076f9d59a1c80318fc775f

Update README.md Co-authored-by: Peter Saxton <peterhsaxton@gmail.com>

view details

Tristan Sloughter

commit sha ea02818322e37b52d26e00777a1cf07681f40cf9

Merge pull request #172 from tsloughter/api-repo-readme remove reference to opentelemetry-erlang-api in the README

view details

push time in a day

issue closedopen-telemetry/opentelemetry-erlang

Link to archived project in the README

https://github.com/open-telemetry/opentelemetry-erlang/blob/master/README.md#design

The section linked above says If you are instrumenting a project your application should only depend on the OpenTelemetry API application. However following that link takes you to an archived project that links back around to the original project.

Unclear what the correct course of action is

closed time in a day

CrowdHailer

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

Yea, adding truncation in the io_lib:format call makes sense.

gugahoa

comment created time in a day

issue openedopentelemetry-beam/opentelemetry_zipkin

Add a token to the configuration examples.

I'm trying to send my tracing data to lightstep.com

I have got to this instruction and have no idea what it means for this library, is there a standard token configuration option?

Lightstep Satellites need your project’s access token to accept the data. The recommended way to do this is to pass along your Lightstep access token in your Zipkin initialization:

created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

That would probably be safer. If you have a limit to what can be sent, then I do suggest truncating the log output the way the erlang logger (or lager) do it.

gugahoa

comment created time in a day

issue closedopen-telemetry/opentelemetry-erlang

Urgent help needed .. compatibility broken with erlang.mk

Post API and SDK merge, unable to compile the project using erlang.mk since erlang.mk doesn't support rebar3's git_subdir feature yet and because of this the required beam files aren't formed.

Please suggest the best alternative than moving to rebar3 since our build chain heavily relies on erlang.mk usage. Shall I fork the repo back to separate API and SDK repos so that erlang.mk compatibility is restored?

Any sort of help is appreciated.

Thanks!

closed time in a day

SoniCoder

issue commentopen-telemetry/opentelemetry-erlang

Urgent help needed .. compatibility broken with erlang.mk

It seems that erlang.mk does support it as another fetch method which I was not aware of: https://github.com/ninenines/erlang.mk/issues/917

Thanks for help, I'll close it

SoniCoder

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

Well I was going to suggest moving Term to the message field, so that issue would still exist, just in a different field.

gugahoa

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

That could indeed be very large.

1> maps:get(key, <<0:1000>>).
** exception error: {badmap,<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                              0,0,0,0,...>>}
     in function  maps:get/2
        called as maps:get(key,
                           <<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                             ...>>)
2> catch maps:get(key, <<0:1000>>).
{'EXIT',{{badmap,<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                   0,0,0,0,0,...>>},
         [{maps,get,
                [key,<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,...>>],
                []},
          {erl_eval,do_apply,6,[{file,"erl_eval.erl"},{line,684}]},
          {erl_eval,expr,5,[{file,"erl_eval.erl"},{line,437}]},
          {shell,exprs,7,[{file,"shell.erl"},{line,686}]},
          {shell,eval_exprs,7,[{file,"shell.erl"},{line,642}]},
          {shell,eval_loop,3,[{file,"shell.erl"},{line,627}]}]}}

For example, a map error like that has the whole bad term in the reason. If you were to pass a 200mb file, you'll have a 200mb type key.

gugahoa

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

remove reference to opentelemetry-erlang-api in the README

 Requires OTP 21.3 or above.  The [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification) defines a language library as having 2 components, the API and the SDK. The API must not only define the interfaces of any implementation in that language but also be able to function as a noop implementation of the tracer. The SDK is the default implementation of the API that must be optional. -If you are instrumenting a project your application should only depend on the [OpenTelemetry API](https://github.com/open-telemetry/opentelemetry-erlang-api/) application. +If you are instrumenting a project your application should only depend on the
when instrumenting a project your application should only depend on the
tsloughter

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

remove reference to opentelemetry-erlang-api in the README

 Requires OTP 21.3 or above.  The [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification) defines a language library as having 2 components, the API and the SDK. The API must not only define the interfaces of any implementation in that language but also be able to function as a noop implementation of the tracer. The SDK is the default implementation of the API that must be optional. -If you are instrumenting a project your application should only depend on the [OpenTelemetry API](https://github.com/open-telemetry/opentelemetry-erlang-api/) application. +If you are instrumenting a project your application should only depend on the

Yea, that sounds better. Can you make a github suggestion so I can just merge it in here.

tsloughter

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

remove reference to opentelemetry-erlang-api in the README

 Requires OTP 21.3 or above.  The [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification) defines a language library as having 2 components, the API and the SDK. The API must not only define the interfaces of any implementation in that language but also be able to function as a noop implementation of the tracer. The SDK is the default implementation of the API that must be optional. -If you are instrumenting a project your application should only depend on the [OpenTelemetry API](https://github.com/open-telemetry/opentelemetry-erlang-api/) application. +If you are instrumenting a project your application should only depend on the

Can i suggest "if you are instrumenting" becomes "when instrumenting"

tsloughter

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 add_events(SpanCtx=#span_ctx{span_sdk={Module, _}}, Events) when ?is_recording(S add_events(_, _) ->     false. +-spec record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) -> boolean() when+      SpanCtx :: opentelemetry:span_ctx(),+      Class :: atom(),+      Term :: term(),+      Stacktrace :: list(any()),+      Attributes :: opentelemetry:attributes().+record_exception(SpanCtx, Class, Term, Stacktrace, Attributes) ->+    ExceptionAttributes = [{<<"exception.type">>, iolist_to_binary(io_lib:format("~p:~p", [Class, Term]))},

I'm not sure that Term should be included in the type? @ferd thoughts?

gugahoa

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

remove reference to opentelemetry-erlang-api in the README

 Requires OTP 21.3 or above.  The [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification) defines a language library as having 2 components, the API and the SDK. The API must not only define the interfaces of any implementation in that language but also be able to function as a noop implementation of the tracer. The SDK is the default implementation of the API that must be optional. -If you are instrumenting a project your application should only depend on the [OpenTelemetry API](https://github.com/open-telemetry/opentelemetry-erlang-api/) application. +If you are instrumenting a project your application should only depend on the

Even if the application being instrumented isn't used by others the user should still stick to the API unless they are writing something that requires direct SDK access, like an exporter.

tsloughter

comment created time in a day

Pull request review commentopen-telemetry/opentelemetry-erlang

Add RecordException to Elixir's Span module

 record_but_not_sample(Config) ->      ok. +record_exception_works(Config) ->+    Tid = ?config(tid, Config),+    SpanCtx = ?start_span(<<"span-1">>),+    try throw(my_error) of+        _ ->+        ok+    catch+        Class:Term:Stacktrace ->+            otel_span:record_exception(SpanCtx, Class, Term, Stacktrace, [{"some-attribute", "value"}]),+            ?end_span(SpanCtx),+            [Span] = assert_exported(Tid, SpanCtx),+            [Event] = Span#span.events,+            ?assertEqual(Event#event.name, <<"exception">>),+            ?assertEqual(Event#event.attributes, [{<<"exception.type">>, ["throw",58,"my_error"]},

I'm not sure I understood this. I understood that attribute value can be a list/array of integer, but we need to use binaries for strings in attributes. So I have to change something somewhere to get a binary from that list, is that correct?

I made a fix with what I understood (https://github.com/open-telemetry/opentelemetry-erlang/pull/138/commits/3b03145c51123eca241e0667a48464cca1e0f75d) but if I misunderstood I can revert and properly fix it

gugahoa

comment created time in 2 days

issue commentopen-telemetry/opentelemetry-erlang

Urgent help needed .. compatibility broken with erlang.mk

I guess the only alternative to moving to rebar3 or adding support to erlang.mk is to stick to the hex packages -- or, yes, keeping your own separated repos in sync somehow.

SoniCoder

comment created time in 2 days

more