44fd2a6871
* Boostrap Phoenix application from mix phx.new * Add opentelemetry dependencies * Setup opentelemetry for local env * Setup Dockerfile, docker-compose and otel config * Configure runtime config for exporter to export to otel collector in prod env * Generate Posts HTML resources * Add Release module to run migration in release * Generate Users LiveView resource * Add exporter configuration to export directly to external service * Update README.md to include description and instructions * Update README.md to include more details on exporting traces * Fix otlp collector deprecated ports as suggested
18 lines
271 B
Elixir
18 lines
271 B
Elixir
defmodule Demo.Accounts.User do
|
|
use Ecto.Schema
|
|
import Ecto.Changeset
|
|
|
|
schema "users" do
|
|
field :name, :string
|
|
|
|
timestamps()
|
|
end
|
|
|
|
@doc false
|
|
def changeset(user, attrs) do
|
|
user
|
|
|> cast(attrs, [:name])
|
|
|> validate_required([:name])
|
|
end
|
|
end
|