Comments (7)
To reproduce the bug, follow these steps:
- Create directory to host the example_app
mkdir example_app && cd example_app
- Place
mix.exs
in there containing the following text:
defmodule App.MixProject do
use Mix.Project
def project do
[
app: :app,
version: "0.1.0",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:appsignal, "~> 2.7.4"},
{:ssl_verify_fun, "~> 1.1.6", manager: :rebar3, only: [:test], runtime: false, override: true}
]
end
end
- Place the following Dockerfile in the same directory
ARG ELIXIR_VERSION=1.15.0
ARG OTP_VERSION=26.0.1
ARG DEBIAN_VERSION=bullseye-20230522
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}"
FROM ${BUILDER_IMAGE} as builder
# install build dependencies
RUN apt-get update -y && apt-get install -y build-essential git curl ca-certificates wget libc6-dev \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN update-ca-certificates
WORKDIR /app
# install hex + rebar
RUN mix local.hex --force && \
mix local.rebar --force
# set build ENV
ENV MIX_ENV="prod"
COPY mix.exs mix.exs
RUN mix deps.get --only $MIX_ENV
RUN mix deps.compile
- Build Docker image:
docker build .
If you notice, the mix.exs file contains a workaround for compilation issues of :ssl_verify_fun
recommended by @josevalim , and it may or may not be related - since it's part of the dependency tree for :hackney
from appsignal-elixir.
OKAY please ignore me and this bug report, I figured it out.
The problem was in mix.exs
on this line:
{:ssl_verify_fun, "~> 1.1.6", manager: :rebar3, only: [:test], runtime: false, override: true}
It had only: [:test]
which I blindly copied in and left there, removing this part fixes the issue.
from appsignal-elixir.
Hi @hubertlepicki, great you managed to get it to work! I remember the ssl_verify_fun needs an update for 1.15 to work. We're working this week on adding 1.15 to the CI so if any other things pop up we hope to fix it.
from appsignal-elixir.
@tombruijn thanks!
BTW: Did you folks consider getting rid of hackney dependency? It appears you use it to download Agent, and maybe there's a better way to do it now - either using the built in Erlang client (probably bad idea) or one of the lightweight pure Elixir clients such as Mint or Finch?
from appsignal-elixir.
Not right now. We used curl before, so that created an external dependency.
from appsignal-elixir.
If you are only downloading an agent, then using httpc is fine, as long as you use CAStore for certificates and configure the SSL stuff: https://github.com/livebook-dev/livebook/blob/main/lib/livebook/utils/http.ex#L1 - that's also how Phoenix downloads tailwind, esbuild, etc.
from appsignal-elixir.
We're using Hackney to download the agent on package installation, validate the Push API key on installation and send a diagnose report for support purposes.
Thanks for the livebook httpc example! We can try using that again.
I remember we tried using httpc before in PR #140, but ran into some issues figuring out how it worked.
from appsignal-elixir.
Related Issues (20)
- Custom params and session data is overwritten by Plug integration HOT 3
- How to filter out events programmatically? HOT 13
- Implement a way to set span name and attributes without overriding
- AppSignal doesn't build with the new linker in Xcode 15 HOT 8
- Drop support for unmaintained Elixir/Erlang versions
- Provide logging feature through a logger handler HOT 1
- Collect Ecto stacktraces HOT 9
- Are calls to `add_distribution_value` synchronous or asynchronous? Can they raise errors? HOT 2
- Neon startup causes errors to be sent to AppSignal HOT 2
- (Mox) testing guidelines? HOT 3
- Oban "Insert job" should not be a root span HOT 1
- AppSignal causes Phoenix to seg fault when a request is received on MacOS 13.6 HOT 12
- Expose a way to clone the Tracer stack for a process HOT 2
- Allow for additional context to be added to Tesla calls
- Memory leak when running long, work intensive Oban background job HOT 10
- Jobs cancelled via Oban Web are not properly closed
- `Logger.error` does not log AppSignal Error HOT 2
- Clickable stack traces to directly jump into the source HOT 1
- Allow setting per-process metadata to unhandled exceptions HOT 3
- Consider sharing exception "blame" information to aid debugging HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appsignal-elixir.