Conversation
|
can't build until ocaml/opam-repository#29421 is merged |
| and poll is guaranteed to be available without the fd limitation. | ||
| *) | ||
| let () = | ||
| if not (Lwt_config._HAVE_LIBEV && Lwt_config.libev_default) then begin |
There was a problem hiding this comment.
is this method not available in lwt 6?
There was a problem hiding this comment.
it is available
is the concern that then we don't have a version of devkit that's compatible with both 5.9 and 6 so it makes the upgrade for users more difficult? if that's the case then i have ocsigen/lwt#1106 in the works to allow specifically for that
rr0gi
left a comment
There was a problem hiding this comment.
is lwt_engine change required?
| end | ||
| | Lwt_engine.Engine_id__poll -> () | ||
| | lwteng -> | ||
| eprintfn "Unknown Lwt engine (%s) in use, leaving as is" Obj.Extension_constructor.(name (of_val lwteng)); |
There was a problem hiding this comment.
i see Obj i suspect
there is no name function to use?
but then anw i would rather emit log for non-default behaviour branch (ie select=>poll) and do not log anything in other branches (ie here)
There was a problem hiding this comment.
i can make that change
devkit.opam
Outdated
| "curl_lwt" | ||
| "pcre2" {>= "8.0.3"} | ||
| "trace" {>= "0.4"} | ||
| "trace" {>= "0.10" & < "0.11"} |
There was a problem hiding this comment.
there's a different incompatibility that's only unearthed when you unlock ocaml5 or lwt6
basically using lwt6+ocaml5 changes the dependency cone so that it allows trace>=0.11 which was not allowed before and that breaks some things, the upper bound was implicit by transitivity but has to be made explicit now
| let get_ambient ?explicit_span () = | ||
| let get_ambient ?explicit_span:_ () = | ||
| let* Scope.{ trace_id; span_id; _ } = Scope.get_ambient_scope () in | ||
| let span_id = match explicit_span with | ||
| | Some {Trace_core.span; _} -> Opentelemetry_trace.Conv.span_id_to_otel span | ||
| | None -> span_id | ||
| in |
There was a problem hiding this comment.
@c-cube I got lost in the old/new combinators and took an off-road shortcut, could you help me figure out how to get the span-id out of the explicit_span parameter?
| match Scope.get_ambient_scope () with | ||
| | None -> | ||
| Trace_core.enter_manual_span ~parent:None ~__FUNCTION__ ~__FILE__ ~__LINE__ ?data name | ||
| | Some Scope.{ span_id; trace_id; _ } -> | ||
| let otrace_espan = Trace_core.{ | ||
| span = Opentelemetry_trace.Conv.span_id_of_otel span_id; | ||
| trace_id = Opentelemetry_trace.Conv.trace_id_of_otel trace_id; | ||
| meta = Trace_core.Meta_map.empty | ||
| } in | ||
| let parent = Some (Trace_core.ctx_of_span otrace_espan) in | ||
| Trace_core.enter_manual_span ~parent ~__FUNCTION__ ~__FILE__ ~__LINE__ ?data name | ||
| Trace_core.enter_span ~parent:None ~__FUNCTION__ ~__FILE__ ~__LINE__ ?data name |
|
It's working with recent versions on the master branch! It's an extensible sum type now, directly containing the otel span
|
What's a ballpark for a release date for that feature of the master branch? Just for planning, no pressure. |
note that bc lwt had some significant changes in version 6, the version after this PR is not compatible with lwt<6. we might want to do something special like keeping a separate branch for lwt<6 support with distinct releases and such. or not? what do you think?