profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mspanc/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Marcin Lewandowski mspanc @membraneframework @SoftwareMansion @radiokit Kraków, Poland

mspanc/ecto_boot_migration 10

Tool for running Ecto migrations upon boot of the Elixir application.

mspanc/dbux 9

D-Bus bindings for the Elixir language

mspanc/activerecord-enum-without-methods 5

This gem does the same as ActiveRecord::Base#enum but does not define enum_value? and enum_value! methods so you can use the same value in multiple enums

mspanc/dokku-slack 2

A Slack notifier for Dokku

mspanc/carrierwave-hex-prefix-for-file-storage 1

Enscapsulates directory naming scheme for carrierwave file storage, enabling creation of directory structure that will be efficient and survive subdirs limit

mspanc/cloudamp 1

CloudAmp is an ultimate online player for SoundCloud tracks.

mspanc/active_admin 0

The administration framework for Ruby on Rails applications.

mspanc/administrate-field-nested_has_many 0

A plugin for nested has_many forms in Administrate

push eventmembraneframework/membrane_core

sheldak

commit sha 8da3e19f3de2f9b2b6cd07da822be43789e2114f

adjust to review

view details

push time in 4 hours

push eventmembraneframework/membrane_core

sheldak

commit sha 3b033efe378b26ca4c6fe2874a0b69613a70373e

create Membrane.Core.Telemetry for telemetry functions

view details

push time in 5 hours

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do   end    @doc """-  Macro for reporting new links.--  Links are reported only when metrics reporting is enabled in the application using Membrane Core.+  Reports metrics such as input buffer's size inside functions, incoming events and received caps.   """-  defmacro report_new_link(from, to) do-    if @enable_metrics do-      quote do-        alias Membrane.ComponentPath-        alias Membrane.Core.Parent.Link.Endpoint+  @spec report_metric(String.t(), integer(), String.t()) :: :ok+  def report_metric(metric, value, log_tag) do+    calculate_measurement = get_calculate_measurement_function(metric, value, log_tag)++    report_measurement(+      [:membrane, :metric, :value],+      calculate_measurement+    )+  end -        require Membrane.Pad+  @doc """+  Reports new link connection being initialized in pipeline.+  """+  @spec report_new_link(Endpoint.t(), Endpoint.t()) :: :ok+  def report_new_link(from, to) do

Currently report_measurement accepts function. I wanted to separate metrics (events, caps, input buffer's sizes) from all measurements (both metrics and new links) so I have changed the name.

Okay, I can make report_new_link private and move to Membrane.Core.Parent.Link, but what about report_metric which is called from 3 places?

mickel8

comment created time in 2 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do   end    @doc """-  Macro for reporting new links.--  Links are reported only when metrics reporting is enabled in the application using Membrane Core.+  Reports metrics such as input buffer's size inside functions, incoming events and received caps.   """-  defmacro report_new_link(from, to) do-    if @enable_metrics do-      quote do-        alias Membrane.ComponentPath-        alias Membrane.Core.Parent.Link.Endpoint+  @spec report_metric(String.t(), integer(), String.t()) :: :ok+  def report_metric(metric, value, log_tag) do+    calculate_measurement = get_calculate_measurement_function(metric, value, log_tag)++    report_measurement(+      [:membrane, :metric, :value],+      calculate_measurement+    )+  end -        require Membrane.Pad+  @doc """+  Reports new link connection being initialized in pipeline.+  """+  @spec report_new_link(Endpoint.t(), Endpoint.t()) :: :ok+  def report_new_link(from, to) do

The point of making report_metric accept function was to make this private, as it's only used inside the core. So let's move that to Membrane.Core.Parent.Link.

mickel8

comment created time in 2 days

push eventmembraneframework/membrane_core

sheldak

commit sha 168fcca559bc198e855f531f636ffa8eb2c01404

redesign telemetry functions

view details

push time in 2 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do           pad_to: String.t()         } -  @spec new_link_event_name() :: event_name_t()-  def new_link_event_name, do: [:membrane, :link, :new]+  @doc """+  Macro for reporting metric measurements.++  Metrics are reported only when it is enabled in the application using Membrane Core.+  """+  defmacro report_metric(metric, value, log_tag) do+    if @enable_metrics do+      quote do+        alias Membrane.ComponentPath++        path = ComponentPath.get_formatted() <> "/" <> (unquote(log_tag) || "")++        :telemetry.execute(+          [:membrane, :metric, :value],+          %{+            element_path: path,+            metric: unquote(metric),+            value: unquote(value)+          },+          %{}+        )+      end+    else+      # A hack to suppress the 'unused variable' warnings+      quote do+        fn ->+          _unused = unquote(metric)+          _unused = unquote(value)+          _unused = unquote(log_tag)+        end++        :ok+      end+    end+  end++  @doc """+  Macro for reporting new links.++  Links are reported only when metrics reporting is enabled in the application using Membrane Core.+  """+  defmacro report_new_link(from, to) do

I will change that

mickel8

comment created time in 2 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do           pad_to: String.t()         } -  @spec new_link_event_name() :: event_name_t()-  def new_link_event_name, do: [:membrane, :link, :new]+  @doc """+  Macro for reporting metric measurements.++  Metrics are reported only when it is enabled in the application using Membrane Core.+  """+  defmacro report_metric(metric, value, log_tag) do+    if @enable_metrics do+      quote do+        alias Membrane.ComponentPath++        path = ComponentPath.get_formatted() <> "/" <> (unquote(log_tag) || "")++        :telemetry.execute(+          [:membrane, :metric, :value],+          %{+            element_path: path,

I can change that. It also requires changes in Reporter and Dashboard (due to change in DB I assume is necessary for consistence in naming - there is entire table called element_paths now, so I will change it to component_paths).

Now, I think, is the best moment for any other naming changes if they are necessary, because I am already working on Reporter and Dashboard.

mickel8

comment created time in 2 days

PR opened membraneframework/membrane_core

Clarify callback_return_t and add typedoc

We traced through some code to try to describe the consequences of return specific values from callbacks, and we think this is correct.

t:CallbackHandler.callback_return_t() is in a @moduledoc false module, so does not end up linkable. We thought that making that module show up in documentation might have unintended consequences, so switched c:handle_init/1 to use the local type. We also weren't sure how to describe CallbackHandler or put it into the proper place in the doc list.

Alternatively, if there was a good moduledoc that could be put into Membrane.Core.CallbackHandler, that could be where these types all get directed to and document.

+30 -9

0 comment

4 changed files

pr created time in 3 days

fork bitwalker/commanded

Use Commanded to build Elixir CQRS/ES applications

fork in 3 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do           pad_to: String.t()         } -  @spec new_link_event_name() :: event_name_t()-  def new_link_event_name, do: [:membrane, :link, :new]+  @doc """+  Macro for reporting metric measurements.++  Metrics are reported only when it is enabled in the application using Membrane Core.+  """+  defmacro report_metric(metric, value, log_tag) do+    if @enable_metrics do+      quote do+        alias Membrane.ComponentPath++        path = ComponentPath.get_formatted() <> "/" <> (unquote(log_tag) || "")++        :telemetry.execute(+          [:membrane, :metric, :value],+          %{+            element_path: path,+            metric: unquote(metric),+            value: unquote(value)+          },+          %{}+        )+      end+    else+      # A hack to suppress the 'unused variable' warnings+      quote do+        fn ->+          _unused = unquote(metric)+          _unused = unquote(value)+          _unused = unquote(log_tag)+        end++        :ok+      end+    end+  end++  @doc """+  Macro for reporting new links.++  Links are reported only when metrics reporting is enabled in the application using Membrane Core.+  """+  defmacro report_new_link(from, to) do

I would instead provide a generic report_metric_lazy(metric, function, log_tag) that would accept a function calculating value instead of a value itself. Reporting links could use that instead of having a separate macro for that purpose.

mickel8

comment created time in 3 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.Telemetry do           pad_to: String.t()         } -  @spec new_link_event_name() :: event_name_t()-  def new_link_event_name, do: [:membrane, :link, :new]+  @doc """+  Macro for reporting metric measurements.++  Metrics are reported only when it is enabled in the application using Membrane Core.+  """+  defmacro report_metric(metric, value, log_tag) do+    if @enable_metrics do+      quote do+        alias Membrane.ComponentPath++        path = ComponentPath.get_formatted() <> "/" <> (unquote(log_tag) || "")++        :telemetry.execute(+          [:membrane, :metric, :value],+          %{+            element_path: path,
            component_path: path,
mickel8

comment created time in 3 days

issue openedmembraneframework/membrane_core

This is a test issue

This issue is for testing purposes

created time in 4 days

issue commentmembraneframework/membrane_core

Add more telemetry events

Processed events and processed caps added in More telemetry events #308

mat-hek

comment created time in 4 days

push eventmembraneframework/membrane_core

sheldak

commit sha eddfa4e2aea9dcc230f27078fc722f4b98680ace

change method to metric

view details

sheldak

commit sha 92c7040cf62d937c7c9ac9850083d9838cbf93ca

add events and caps reporting

view details

sheldak

commit sha 8a90960fc893bd136039e93e63f60f83516d1874

add possibility to disable metrics reporting

view details

sheldak

commit sha 1799240ff0a773c9a7c2e18917ef8ce169ba0de8

adjust to review

view details

Samuel Hełdak

commit sha f9ca540ff46fbcb342e729787e2b2d65c549c2f8

Merge pull request #308 from membraneframework/more-telemetry-events More telemetry events

view details

push time in 4 days

delete branch membraneframework/membrane_core

delete branch : more-telemetry-events

delete time in 4 days

PR merged membraneframework/membrane_core

More telemetry events telemetry

Work in progress.

Current changes:

  • method is now called metric
  • input_buffer_size_event is now called metric_event
  • added reporting caps
  • added reporting event
  • added possibility to disable reporting metrics

Adds two metrics from Add more telemetry events #297

+107 -50

0 comment

5 changed files

sheldak

pr closed time in 4 days

push eventmembraneframework/membrane_core

sheldak

commit sha 1799240ff0a773c9a7c2e18917ef8ce169ba0de8

adjust to review

view details

push time in 4 days

Pull request review commentmembraneframework/membrane_core

More telemetry events

 defmodule Membrane.Telemetry do    @spec new_link_event_name() :: event_name_t()   def new_link_event_name, do: [:membrane, :link, :new]++  @doc """+  Macro for reporting metric measurements.++  Metrics are reported only when it is enabled in the application using Membrane Core.+  """+  defmacro report_metric(metric, value, log_tag) do+    if @enable_metrics do+      quote do+        alias Membrane.ComponentPath++        path = ComponentPath.get_formatted() <> "/" <> (unquote(log_tag) || "")++        :telemetry.execute(+          unquote(metric_event_name()),

I guess you can put directly the array here instead of having it in function call.

sheldak

comment created time in 4 days

push eventmembraneframework/membrane_core

sheldak

commit sha a7ebed0e9f1da312207d6a29296b014428f32e85

adjust to review

view details

push time in 4 days

Pull request review commentmembraneframework/membrane_core

More telemetry events

 defmodule Membrane.Core.Element.EventController do    defp stream_event_to_callback(%Events.StartOfStream{}), do: :handle_start_of_stream   defp stream_event_to_callback(%Events.EndOfStream{}), do: :handle_end_of_stream++  defp report_event(log_tag) do

This thread is old but do the same thing as with caps, you probably don't need this function.

sheldak

comment created time in 4 days

Pull request review commentmembraneframework/membrane_core

More telemetry events

 defmodule Membrane.Telemetry do    The following events are published by Membrane's Core with following measurement types and metadata: -    * `[:membrane, :input_buffer, :size]` - to report current input buffer's size.-        * Measurement: `t:input_buffer_size_event_value_t/0`+    * `[:membrane, :metric, :value]` - used to report metrics, such as input buffer's size inside functions, incoming events and received caps.+        * Measurement: `t:metric_event_value_t/0`         * Metadata: `%{}`      * `[:membrane, :link, :new]` - to report new link connection being initialized in pipeline.         * Measurement: `t:new_link_event_value_t/0`         * Metadata: `%{}` +  It also privides macros to report metrics. Metrics are reported only when application using Membrane Core specifies following in compile-time config file:++      config :membrane_core,+        enable_metrics: true+   """ +  @enable_metrics Application.compile_env(:membrane_core, :enable_metrics, false)+   @type event_name_t :: [atom(), ...]    @typedoc """   * element_path - element's process path with pad's name that input buffer is attached to-  * method - input buffer's function call name-  * value - current buffer's size+  * metric - metric name
  * metric - metric's name
sheldak

comment created time in 4 days

Pull request review commentmembraneframework/membrane_core

More telemetry events

 defmodule Membrane.Core.Element.CapsController do    require Membrane.Core.Child.PadModel   require Membrane.Logger+  require Membrane.Telemetry    @doc """   Handles incoming caps: either stores them in InputBuffer, or executes element callback.   """   @spec handle_caps(Pad.ref_t(), Caps.t(), State.t()) :: State.stateful_try_t()   def handle_caps(pad_ref, caps, state) do+    report_caps(inspect(pad_ref))

Do you need to wrap the Membrane.Telemetry.report_metric into a function? With this approach you are calling unnecessarily a function that will just return :ok. When using directly there won't event be code to run.

And I think if you just use it in a single place you don't have to wrap that call and it will look more descriptive.

sheldak

comment created time in 4 days

push eventmembraneframework/membrane_core

Mateusz Front

commit sha d4e13c47cc1ff74c6bbbe2074e714e37a23d29e6

merge remote_stream into the core

view details

Mateusz Front

commit sha 72401b0a5c19393d1f81bb37c8456ac226157823

Merge pull request #309 from membraneframework/remote_stream merge remote_stream into the core

view details

Michał Śledź

commit sha 4f711d24a44045d4857a47ed57b1ef07c316f9bc

bump to 0.7.0

view details

Michał Śledź

commit sha 2807b522009013a513e968f998112508b2c2b36d

update lockfile

view details

Michał Śledź

commit sha 434d0e309c00a1c6af0ee0b243a1b3c656e47cfa

Require elixir 1.10. Always use Appliaction.compile_env

view details

Michał Śledź

commit sha bdebf02f74a5beded34b47c1f1ddcfdb8e235757

Update CI docker image to membraneframeworklabs/docker_membrane

view details

Michał Śledź

commit sha 8bd80a93bdae9deebec9550e9a041361990adca9

Format code

view details

AndrzejPodo

commit sha 28f2e2b390e1333c628620bb54c93bfc3bdb2f25

fix mix docs

view details

Michał Śledź

commit sha b3e670db7a6c7b347c60527792ad9f7088a203b0

Refactor code

view details

andpodob

commit sha ee298f8f53a020adac077cad1b2d7a1ecef721fc

Update lib/membrane/parent_spec.ex Co-authored-by: Mateusz Front <mateusz.front@swmansion.com>

view details

Michał Śledź

commit sha 4199c57c1ee9b0aa3611ae07f38e0859adef5a41

Fix dialyzer warnings. Add dialyzer to CI

view details

sheldak

commit sha eddfa4e2aea9dcc230f27078fc722f4b98680ace

change method to metric

view details

sheldak

commit sha 92c7040cf62d937c7c9ac9850083d9838cbf93ca

add events and caps reporting

view details

sheldak

commit sha 8a90960fc893bd136039e93e63f60f83516d1874

add possibility to disable metrics reporting

view details

push time in 4 days

push eventmembraneframework/membrane_core

sheldak

commit sha b5911bc17be3533d6590a761bf70018ac2760ed1

add possibility to disable metrics reporting

view details

push time in 4 days

push eventmembraneframework/membrane_core

Michał Śledź

commit sha 4199c57c1ee9b0aa3611ae07f38e0859adef5a41

Fix dialyzer warnings. Add dialyzer to CI

view details

push time in 7 days

push eventmembraneframework/membrane_core

Michał Śledź

commit sha c36776d787e4401877813643b1cf393d4358585c

Fix dialyzer warnings. Add dialyzer to CI

view details

push time in 7 days

push eventmembraneframework/membrane_core

Michał Śledź

commit sha d78bdb64984b276af0daff0948de20ec2967b548

Fix dialyzer warnings. Add dialyzer to CI

view details

push time in 7 days

push eventmembraneframework/membrane_core

Michał Śledź

commit sha c2e84b24065bad56aa7a50f4161d80b3cd5d4675

Fix dialyzer warnings

view details

push time in 7 days

push eventmembraneframework/membrane_core

andpodob

commit sha ee298f8f53a020adac077cad1b2d7a1ecef721fc

Update lib/membrane/parent_spec.ex Co-authored-by: Mateusz Front <mateusz.front@swmansion.com>

view details

push time in 7 days

Pull request review commentmembraneframework/membrane_core

Release membrane_core v0.7.0

 defmodule Membrane.ParentSpec do     end   end +  @opaque link_builder_t :: link_builder_t()

Ah yes..., you're right.

mickel8

comment created time in 7 days